diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index e8b9523c9f39..75c4eaa79588 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -544,9 +544,9 @@ static const struct super_operations cifs_super_ops = { | |||
544 | #endif | 544 | #endif |
545 | }; | 545 | }; |
546 | 546 | ||
547 | static int | 547 | static struct dentry * |
548 | cifs_get_sb(struct file_system_type *fs_type, | 548 | cifs_do_mount(struct file_system_type *fs_type, |
549 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 549 | int flags, const char *dev_name, void *data) |
550 | { | 550 | { |
551 | int rc; | 551 | int rc; |
552 | struct super_block *sb; | 552 | struct super_block *sb; |
@@ -556,18 +556,17 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
556 | cFYI(1, "Devname: %s flags: %d ", dev_name, flags); | 556 | cFYI(1, "Devname: %s flags: %d ", dev_name, flags); |
557 | 557 | ||
558 | if (IS_ERR(sb)) | 558 | if (IS_ERR(sb)) |
559 | return PTR_ERR(sb); | 559 | return ERR_CAST(sb); |
560 | 560 | ||
561 | sb->s_flags = flags; | 561 | sb->s_flags = flags; |
562 | 562 | ||
563 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); | 563 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); |
564 | if (rc) { | 564 | if (rc) { |
565 | deactivate_locked_super(sb); | 565 | deactivate_locked_super(sb); |
566 | return rc; | 566 | return ERR_PTR(rc); |
567 | } | 567 | } |
568 | sb->s_flags |= MS_ACTIVE; | 568 | sb->s_flags |= MS_ACTIVE; |
569 | simple_set_mnt(mnt, sb); | 569 | return dget(sb->s_root); |
570 | return 0; | ||
571 | } | 570 | } |
572 | 571 | ||
573 | static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | 572 | static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, |
@@ -633,7 +632,7 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease) | |||
633 | struct file_system_type cifs_fs_type = { | 632 | struct file_system_type cifs_fs_type = { |
634 | .owner = THIS_MODULE, | 633 | .owner = THIS_MODULE, |
635 | .name = "cifs", | 634 | .name = "cifs", |
636 | .get_sb = cifs_get_sb, | 635 | .mount = cifs_do_mount, |
637 | .kill_sb = kill_anon_super, | 636 | .kill_sb = kill_anon_super, |
638 | /* .fs_flags */ | 637 | /* .fs_flags */ |
639 | }; | 638 | }; |