]> git.hungrycats.org Git - linux/commitdiff
[PATCH] (7/9) more ->get_sb() stuff
authorAlexander Viro <viro@math.psu.edu>
Wed, 6 Feb 2002 14:34:51 +0000 (06:34 -0800)
committerLinus Torvalds <torvalds@athlon.transmeta.com>
Wed, 6 Feb 2002 14:34:51 +0000 (06:34 -0800)
More ->get_sb() patches: autofs

fs/autofs/autofs_i.h
fs/autofs/init.c
fs/autofs/inode.c

index 6d6a334b3717794fc42cf36dd6a4e880bdfc4a6b..354af8325576c9e10734fcdd267192c0d5ceccc8 100644 (file)
@@ -145,7 +145,7 @@ extern struct file_operations autofs_dir_operations;
 
 /* Initializing function */
 
-struct super_block *autofs_read_super(struct super_block *, void *,int);
+int autofs_fill_super(struct super_block *, void *, int);
 
 /* Queue management functions */
 
index 0e7fff94f254c882cfc2d02cb50616ffede2b16e..b73fec09f7c260ac2357c93973218140c82caf48 100644 (file)
 #include <linux/init.h>
 #include "autofs_i.h"
 
-static DECLARE_FSTYPE(autofs_fs_type, "autofs", autofs_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, autofs_fill_super);
+}
+
+static struct file_system_type autofs_fs_type = {
+       owner:          THIS_MODULE,
+       name:           "autofs",
+       get_sb:         autofs_get_sb,
+};
 
 static int __init init_autofs_fs(void)
 {
index d275c5f81e571991cfe11997af576d55befd1306..8a0f463dfaf67fa848ae122d1c858aa665920eb6 100644 (file)
@@ -111,8 +111,7 @@ static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid, pid
        return (*pipefd < 0);
 }
 
-struct super_block *autofs_read_super(struct super_block *s, void *data,
-                                     int silent)
+int autofs_fill_super(struct super_block *s, void *data, int silent)
 {
        struct inode * root_inode;
        struct dentry * root;
@@ -175,7 +174,7 @@ struct super_block *autofs_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;
 
 fail_fput:
        printk("autofs: pipe file descriptor does not contain proper ops\n");
@@ -189,7 +188,7 @@ fail_iput:
 fail_free:
        kfree(sbi);
 fail_unlock:
-       return NULL;
+       return -EINVAL;
 }
 
 static int autofs_statfs(struct super_block *sb, struct statfs *buf)