diff options
| -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 34371637f210..8bd5c2c243a5 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
| @@ -545,9 +545,9 @@ static const struct super_operations cifs_super_ops = { | |||
| 545 | #endif | 545 | #endif |
| 546 | }; | 546 | }; |
| 547 | 547 | ||
| 548 | static int | 548 | static struct dentry * |
| 549 | cifs_get_sb(struct file_system_type *fs_type, | 549 | cifs_do_mount(struct file_system_type *fs_type, |
| 550 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 550 | int flags, const char *dev_name, void *data) |
| 551 | { | 551 | { |
| 552 | int rc; | 552 | int rc; |
| 553 | struct super_block *sb; | 553 | struct super_block *sb; |
| @@ -557,18 +557,17 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
| 557 | cFYI(1, "Devname: %s flags: %d ", dev_name, flags); | 557 | cFYI(1, "Devname: %s flags: %d ", dev_name, flags); |
| 558 | 558 | ||
| 559 | if (IS_ERR(sb)) | 559 | if (IS_ERR(sb)) |
| 560 | return PTR_ERR(sb); | 560 | return ERR_CAST(sb); |
| 561 | 561 | ||
| 562 | sb->s_flags = flags; | 562 | sb->s_flags = flags; |
| 563 | 563 | ||
| 564 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); | 564 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); |
| 565 | if (rc) { | 565 | if (rc) { |
| 566 | deactivate_locked_super(sb); | 566 | deactivate_locked_super(sb); |
| 567 | return rc; | 567 | return ERR_PTR(rc); |
| 568 | } | 568 | } |
| 569 | sb->s_flags |= MS_ACTIVE; | 569 | sb->s_flags |= MS_ACTIVE; |
| 570 | simple_set_mnt(mnt, sb); | 570 | return dget(sb->s_root); |
| 571 | return 0; | ||
| 572 | } | 571 | } |
| 573 | 572 | ||
| 574 | static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | 573 | 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) | |||
| 634 | struct file_system_type cifs_fs_type = { | 633 | struct file_system_type cifs_fs_type = { |
| 635 | .owner = THIS_MODULE, | 634 | .owner = THIS_MODULE, |
| 636 | .name = "cifs", | 635 | .name = "cifs", |
| 637 | .get_sb = cifs_get_sb, | 636 | .mount = cifs_do_mount, |
| 638 | .kill_sb = kill_anon_super, | 637 | .kill_sb = kill_anon_super, |
| 639 | /* .fs_flags */ | 638 | /* .fs_flags */ |
| 640 | }; | 639 | }; |
