]> git.hungrycats.org Git - linux/commitdiff
[PATCH] (1/6) more ->get_sb()
authorAlexander Viro <viro@math.psu.edu>
Thu, 7 Feb 2002 01:56:55 +0000 (17:56 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Thu, 7 Feb 2002 01:56:55 +0000 (17:56 -0800)
smbfs switched to ->get_sb()

fs/smbfs/inode.c
fs/smbfs/proto.h

index 61727bc89e6bd0bb97e24b703a1eb3db1d8ba9bc..688ba2df2e0e7d19bd4c25847b3ced9ef4cf367c 100644 (file)
@@ -460,8 +460,7 @@ smb_put_super(struct super_block *sb)
        }
 }
 
-struct super_block *
-smb_read_super(struct super_block *sb, void *raw_data, int silent)
+int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
 {
        struct smb_sb_info *server = &sb->u.smbfs_sb;
        struct smb_mount_data_kernel *mnt;
@@ -561,7 +560,7 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
                goto out_no_root;
        smb_new_dentry(sb->s_root);
 
-       return sb;
+       return 0;
 
 out_no_root:
        iput(root_inode);
@@ -573,15 +572,15 @@ out_no_temp:
        smb_vfree(server->packet);
 out_no_mem:
        if (!server->mnt)
-               printk(KERN_ERR "smb_read_super: allocation failure\n");
+               printk(KERN_ERR "smb_fill_super: allocation failure\n");
        goto out_fail;
 out_wrong_data:
        printk(KERN_ERR "smbfs: mount_data version %d is not supported\n", ver);
        goto out_fail;
 out_no_data:
-       printk(KERN_ERR "smb_read_super: missing data argument\n");
+       printk(KERN_ERR "smb_fill_super: missing data argument\n");
 out_fail:
-       return NULL;
+       return -EINVAL;
 }
 
 static int
@@ -706,7 +705,17 @@ int smb_current_kmalloced;
 int smb_current_vmalloced;
 #endif
 
-static DECLARE_FSTYPE( smb_fs_type, "smbfs", smb_read_super, 0);
+static struct super_block *smb_get_sb(struct file_system_type *fs_type,
+       int flags, char *dev_name, void *data)
+{
+       return get_sb_nodev(fs_type, flags, data, smb_fill_super);
+}
+
+static struct file_system_type smb_fs_type = {
+       owner:          THIS_MODULE,
+       name:           "smbfs",
+       get_sb:         smb_get_sb,
+};
 
 static int __init init_smb_fs(void)
 {
index 65b18719da77c145539038bc78c7acee538289c2..1f240422b05f6736e779a55518869514441a7ac8 100644 (file)
@@ -53,7 +53,6 @@ extern void smb_get_inode_attr(struct inode *inode, struct smb_fattr *fattr);
 extern void smb_set_inode_attr(struct inode *inode, struct smb_fattr *fattr);
 extern void smb_invalidate_inodes(struct smb_sb_info *server);
 extern int smb_revalidate_inode(struct dentry *dentry);
-extern struct super_block *smb_read_super(struct super_block *sb, void *raw_data, int silent);
 extern int smb_notify_change(struct dentry *dentry, struct iattr *attr);
 /* file.c */
 extern struct address_space_operations smb_file_aops;