Skip to content

Commit d753ed9

Browse files
author
Al Viro
committed
convert cifs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent e4c59d6 commit d753ed9

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎fs/cifs/cifsfs.c‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,9 @@ static const struct super_operations cifs_super_ops = {
545545
#endif
546546
};
547547

548-
static int
549-
cifs_get_sb(struct file_system_type *fs_type,
550-
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
548+
static struct dentry *
549+
cifs_do_mount(struct file_system_type *fs_type,
550+
int flags, const char *dev_name, void *data)
551551
{
552552
int rc;
553553
struct super_block *sb;
@@ -557,18 +557,17 @@ cifs_get_sb(struct file_system_type *fs_type,
557557
cFYI(1, "Devname: %s flags: %d ", dev_name, flags);
558558

559559
if (IS_ERR(sb))
560-
return PTR_ERR(sb);
560+
return ERR_CAST(sb);
561561

562562
sb->s_flags = flags;
563563

564564
rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0);
565565
if (rc) {
566566
deactivate_locked_super(sb);
567-
return rc;
567+
return ERR_PTR(rc);
568568
}
569569
sb->s_flags |= MS_ACTIVE;
570-
simple_set_mnt(mnt, sb);
571-
return 0;
570+
return dget(sb->s_root);
572571
}
573572

574573
static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
@@ -634,7 +633,7 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease)
634633
struct file_system_type cifs_fs_type = {
635634
.owner = THIS_MODULE,
636635
.name = "cifs",
637-
.get_sb = cifs_get_sb,
636+
.mount = cifs_do_mount,
638637
.kill_sb = kill_anon_super,
639638
/* .fs_flags */
640639
};

0 commit comments

Comments
 (0)