Skip to content

Commit

Permalink
nfs: don't bother setting/restoring export_path around do_nfs_root_mo…
Browse files Browse the repository at this point in the history
…unt()

nothing in it will be looking at that thing anyway

Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Al Viro authored and amschuma-ntap committed Jan 15, 2020
1 parent 15a9c4e commit 6654f8e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fs/nfs/nfs4super.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,10 @@ struct dentry *nfs4_try_mount(int flags, const char *dev_name,
dfprintk(MOUNT, "--> nfs4_try_mount()\n");

export_path = data->nfs_server.export_path;
data->nfs_server.export_path = "/";
root_mnt = nfs_do_root_mount(
nfs4_create_server(mount_info, &nfs_v4),
flags, mount_info,
data->nfs_server.hostname);
data->nfs_server.export_path = export_path;

res = nfs_follow_remote_path(root_mnt, export_path);

Expand Down Expand Up @@ -271,12 +269,10 @@ static struct dentry *nfs4_referral_mount(struct file_system_type *fs_type,
return ERR_PTR(-ENOMEM);

export_path = data->mnt_path;
data->mnt_path = "/";
root_mnt = nfs_do_root_mount(
nfs4_create_referral_server(mount_info.cloned,
mount_info.mntfh),
flags, &mount_info, data->hostname);
data->mnt_path = export_path;

res = nfs_follow_remote_path(root_mnt, export_path);
dprintk("<-- nfs4_referral_mount() = %d%s\n",
Expand Down

0 comments on commit 6654f8e

Please sign in to comment.