patch-2.3.51 linux/fs/autofs4/inode.c
Next file: linux/fs/autofs4/root.c
Previous file: linux/fs/autofs4/init.c
Back to the patch index
Back to the overall index
- Lines: 110
- Date:
Fri Mar 10 13:03:56 2000
- Orig file:
v2.3.50/linux/fs/autofs4/inode.c
- Orig date:
Sat Feb 26 22:31:51 2000
diff -u --recursive --new-file v2.3.50/linux/fs/autofs4/inode.c linux/fs/autofs4/inode.c
@@ -103,10 +103,6 @@
kfree(sbi);
DPRINTK(("autofs: shutting down\n"));
-
-#ifdef MODULE
- MOD_DEC_USE_COUNT;
-#endif
}
static void autofs4_umount_begin(struct super_block *sb)
@@ -117,7 +113,7 @@
autofs4_catatonic_mode(sbi);
}
-static int autofs4_statfs(struct super_block *sb, struct statfs *buf, int bufsiz);
+static int autofs4_statfs(struct super_block *sb, struct statfs *buf);
static void autofs4_read_inode(struct inode *inode);
static void autofs4_write_inode(struct inode *inode);
@@ -219,9 +215,6 @@
struct autofs_sb_info *sbi;
int minproto, maxproto;
- MOD_INC_USE_COUNT;
-
- lock_super(s);
/* Super block already completed? */
if (s->s_root)
goto out_unlock;
@@ -248,7 +241,6 @@
s->s_magic = AUTOFS_SUPER_MAGIC;
s->s_op = &autofs4_sops;
s->s_root = NULL;
- unlock_super(s); /* shouldn't we keep it locked a while longer? */
/*
* Get the root inode and dentry, but defer checking for errors.
@@ -315,7 +307,6 @@
* Success ... somebody else completed the super block for us.
*/
out_unlock:
- unlock_super(s);
goto out_dec;
out_fput:
if (pipe)
@@ -326,7 +317,6 @@
else
iput(root_inode);
out_dec:
- MOD_DEC_USE_COUNT;
return s;
/*
@@ -337,14 +327,12 @@
/*
* fput() can block, so we clear the super block first.
*/
- s->s_dev = 0;
fput(pipe);
/* fall through */
fail_dput:
/*
* dput() can block, so we clear the super block first.
*/
- s->s_dev = 0;
dput(root);
goto fail_free;
fail_iput:
@@ -352,32 +340,22 @@
/*
* iput() can block, so we clear the super block first.
*/
- s->s_dev = 0;
iput(root_inode);
fail_free:
kfree(sbi);
- goto fail_dec;
fail_unlock:
- unlock_super(s);
-fail_dec:
- s->s_dev = 0;
- MOD_DEC_USE_COUNT;
return NULL;
}
-static int autofs4_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
+static int autofs4_statfs(struct super_block *sb, struct statfs *buf)
{
- struct statfs tmp;
-
- tmp.f_type = AUTOFS_SUPER_MAGIC;
- tmp.f_bsize = 1024;
- tmp.f_blocks = 0;
- tmp.f_bfree = 0;
- tmp.f_bavail = 0;
- tmp.f_files = 0;
- tmp.f_ffree = 0;
- tmp.f_namelen = NAME_MAX;
- return copy_to_user(buf, &tmp, bufsiz) ? -EFAULT : 0;
+ buf->f_type = AUTOFS_SUPER_MAGIC;
+ buf->f_bsize = 1024;
+ buf->f_bfree = 0;
+ buf->f_bavail = 0;
+ buf->f_ffree = 0;
+ buf->f_namelen = NAME_MAX;
+ return 0;
}
static void autofs4_read_inode(struct inode *inode)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)