}
}
-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;
goto out_no_root;
smb_new_dentry(sb->s_root);
- return sb;
+ return 0;
out_no_root:
iput(root_inode);
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
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)
{
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;