summaryrefslogtreecommitdiffstats
path: root/fs/autofs4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/inode.c')
-rw-r--r--fs/autofs4/inode.c40
1 files changed, 9 insertions, 31 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 40d149272..b4ea73fdb 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -103,10 +103,6 @@ static void autofs4_put_super(struct super_block *sb)
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 @@ static void autofs4_umount_begin(struct super_block *sb)
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 super_block *autofs4_read_super(struct super_block *s, void *data,
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 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data,
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 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data,
* 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 @@ out_dput:
else
iput(root_inode);
out_dec:
- MOD_DEC_USE_COUNT;
return s;
/*
@@ -337,14 +327,12 @@ fail_fput:
/*
* 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 @@ fail_iput:
/*
* 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)