Commit 0d265379 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (8/9) more ->get_sb() stuff

More ->get_sb() patches: autofs4
parent 1cc86697
...@@ -144,7 +144,7 @@ extern struct file_operations autofs4_root_operations; ...@@ -144,7 +144,7 @@ extern struct file_operations autofs4_root_operations;
/* Initializing function */ /* 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); struct autofs_info *autofs4_init_ino(struct autofs_info *, struct autofs_sb_info *sbi, mode_t mode);
/* Queue management functions */ /* Queue management functions */
......
...@@ -14,7 +14,17 @@ ...@@ -14,7 +14,17 @@
#include <linux/init.h> #include <linux/init.h>
#include "autofs_i.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) static int __init init_autofs4_fs(void)
{ {
......
...@@ -173,8 +173,7 @@ static struct autofs_info *autofs4_mkroot(struct autofs_sb_info *sbi) ...@@ -173,8 +173,7 @@ static struct autofs_info *autofs4_mkroot(struct autofs_sb_info *sbi)
return ino; return ino;
} }
struct super_block *autofs4_read_super(struct super_block *s, void *data, int autofs4_fill_super(struct super_block *s, void *data, int silent)
int silent)
{ {
struct inode * root_inode; struct inode * root_inode;
struct dentry * root; struct dentry * root;
...@@ -251,7 +250,7 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data, ...@@ -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. * Success! Install the root dentry now to indicate completion.
*/ */
s->s_root = root; s->s_root = root;
return s; return 0;
/* /*
* Failure ... clean up. * Failure ... clean up.
...@@ -278,7 +277,7 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data, ...@@ -278,7 +277,7 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data,
fail_free: fail_free:
kfree(sbi); kfree(sbi);
fail_unlock: fail_unlock:
return NULL; return -EINVAL;
} }
static int autofs4_statfs(struct super_block *sb, struct statfs *buf) static int autofs4_statfs(struct super_block *sb, struct statfs *buf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment