summaryrefslogtreecommitdiff |
diff options
author | Alexander Viro <viro@math.psu.edu> | 2002-02-06 06:34:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-06 06:34:53 -0800 |
commit | 0d265379403866ec28084ba04c71aaaef15559a9 (patch) | |
tree | ce8fe3860cc61af07f44fb4c24cba0aef245df45 | |
parent | 1cc86697019dfcc0a61d2bfaf8863e108b64fd1e (diff) |
[PATCH] (8/9) more ->get_sb() stuff
More ->get_sb() patches: autofs4
-rw-r--r-- | fs/autofs4/autofs_i.h | 2 | ||||
-rw-r--r-- | fs/autofs4/init.c | 12 | ||||
-rw-r--r-- | fs/autofs4/inode.c | 7 |
3 files changed, 15 insertions, 6 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index 4dcdcaafcca9..7e43620bca87 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -144,7 +144,7 @@ extern struct file_operations autofs4_root_operations; /* Initializing function */ -struct super_block *autofs4_read_super(struct super_block *, void *,int); +int autofs4_fill_super(struct super_block *, void *, int); struct autofs_info *autofs4_init_ino(struct autofs_info *, struct autofs_sb_info *sbi, mode_t mode); /* Queue management functions */ diff --git a/fs/autofs4/init.c b/fs/autofs4/init.c index dbb3e5385ded..fdce6b04367c 100644 --- a/fs/autofs4/init.c +++ b/fs/autofs4/init.c @@ -14,7 +14,17 @@ #include <linux/init.h> #include "autofs_i.h" -static DECLARE_FSTYPE(autofs_fs_type, "autofs", autofs4_read_super, 0); +static struct super_block *autofs_get_sb(struct file_system_type *fs_type, + int flags, char *dev_name, void *data) +{ + return get_sb_nodev(fs_type, flags, data, autofs4_fill_super); +} + +static struct file_system_type autofs_fs_type = { + owner: THIS_MODULE, + name: "autofs", + get_sb: autofs_get_sb, +}; static int __init init_autofs4_fs(void) { diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index 1f2d29f6d0cd..a7331fd67fa9 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c @@ -173,8 +173,7 @@ static struct autofs_info *autofs4_mkroot(struct autofs_sb_info *sbi) return ino; } -struct super_block *autofs4_read_super(struct super_block *s, void *data, - int silent) +int autofs4_fill_super(struct super_block *s, void *data, int silent) { struct inode * root_inode; struct dentry * root; @@ -251,7 +250,7 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data, * Success! Install the root dentry now to indicate completion. */ s->s_root = root; - return s; + return 0; /* * Failure ... clean up. @@ -278,7 +277,7 @@ fail_iput: fail_free: kfree(sbi); fail_unlock: - return NULL; + return -EINVAL; } static int autofs4_statfs(struct super_block *sb, struct statfs *buf) |