diff options
-rw-r--r-- | fs/nfs/super.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 2d7525fbcf25..afeee810f453 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1759,21 +1759,29 @@ static int nfs_request_mount(struct nfs_parsed_mount_data *args, | |||
1759 | return nfs_select_flavor(args, &request); | 1759 | return nfs_select_flavor(args, &request); |
1760 | } | 1760 | } |
1761 | 1761 | ||
1762 | static struct nfs_server *nfs_try_mount_request(struct nfs_mount_info *mount_info, | ||
1763 | struct nfs_subversion *nfs_mod) | ||
1764 | { | ||
1765 | int status; | ||
1766 | |||
1767 | status = nfs_request_mount(mount_info->parsed, mount_info->mntfh); | ||
1768 | if (status) | ||
1769 | return ERR_PTR(status); | ||
1770 | |||
1771 | return nfs_mod->rpc_ops->create_server(mount_info, nfs_mod); | ||
1772 | } | ||
1773 | |||
1762 | struct dentry *nfs_try_mount(int flags, const char *dev_name, | 1774 | struct dentry *nfs_try_mount(int flags, const char *dev_name, |
1763 | struct nfs_mount_info *mount_info, | 1775 | struct nfs_mount_info *mount_info, |
1764 | struct nfs_subversion *nfs_mod) | 1776 | struct nfs_subversion *nfs_mod) |
1765 | { | 1777 | { |
1766 | int status; | ||
1767 | struct nfs_server *server; | 1778 | struct nfs_server *server; |
1768 | 1779 | ||
1769 | if (mount_info->parsed->need_mount) { | 1780 | if (mount_info->parsed->need_mount) |
1770 | status = nfs_request_mount(mount_info->parsed, mount_info->mntfh); | 1781 | server = nfs_try_mount_request(mount_info, nfs_mod); |
1771 | if (status) | 1782 | else |
1772 | return ERR_PTR(status); | 1783 | server = nfs_mod->rpc_ops->create_server(mount_info, nfs_mod); |
1773 | } | ||
1774 | 1784 | ||
1775 | /* Get a volume representation */ | ||
1776 | server = nfs_mod->rpc_ops->create_server(mount_info, nfs_mod); | ||
1777 | if (IS_ERR(server)) | 1785 | if (IS_ERR(server)) |
1778 | return ERR_CAST(server); | 1786 | return ERR_CAST(server); |
1779 | 1787 | ||