diff options
| -rw-r--r-- | fs/smbfs/inode.c | 23 | ||||
| -rw-r--r-- | fs/smbfs/proto.h | 1 |
2 files changed, 16 insertions, 8 deletions
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index 61727bc89e6b..688ba2df2e0e 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c @@ -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) { diff --git a/fs/smbfs/proto.h b/fs/smbfs/proto.h index 65b18719da77..1f240422b05f 100644 --- a/fs/smbfs/proto.h +++ b/fs/smbfs/proto.h @@ -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; |
