aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/internal.h1
-rw-r--r--fs/nfs/mount_clnt.c4
-rw-r--r--fs/nfs/super.c1
3 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 4e983961346e..340ede8f608f 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -72,6 +72,7 @@ struct nfs_mount_request {
72 u32 version; 72 u32 version;
73 unsigned short protocol; 73 unsigned short protocol;
74 struct nfs_fh *fh; 74 struct nfs_fh *fh;
75 int noresvport;
75}; 76};
76 77
77extern int nfs_mount(struct nfs_mount_request *info); 78extern int nfs_mount(struct nfs_mount_request *info);
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index 7e37113d37e3..ca905a5bb1ba 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -50,7 +50,6 @@ int nfs_mount(struct nfs_mount_request *info)
50 .program = &mnt_program, 50 .program = &mnt_program,
51 .version = info->version, 51 .version = info->version,
52 .authflavor = RPC_AUTH_UNIX, 52 .authflavor = RPC_AUTH_UNIX,
53 .flags = 0,
54 }; 53 };
55 struct rpc_clnt *mnt_clnt; 54 struct rpc_clnt *mnt_clnt;
56 int status; 55 int status;
@@ -59,6 +58,9 @@ int nfs_mount(struct nfs_mount_request *info)
59 (info->hostname ? info->hostname : "server"), 58 (info->hostname ? info->hostname : "server"),
60 info->dirpath); 59 info->dirpath);
61 60
61 if (info->noresvport)
62 args.flags |= RPC_CLNT_CREATE_NONPRIVPORT;
63
62 mnt_clnt = rpc_create(&args); 64 mnt_clnt = rpc_create(&args);
63 if (IS_ERR(mnt_clnt)) 65 if (IS_ERR(mnt_clnt))
64 goto out_clnt_err; 66 goto out_clnt_err;
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index e05a77be3068..d8e062fe76b1 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1345,6 +1345,7 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args,
1345 .dirpath = args->nfs_server.export_path, 1345 .dirpath = args->nfs_server.export_path,
1346 .protocol = args->mount_server.protocol, 1346 .protocol = args->mount_server.protocol,
1347 .fh = root_fh, 1347 .fh = root_fh,
1348 .noresvport = args->flags & NFS_MOUNT_NORESVPORT,
1348 }; 1349 };
1349 int status; 1350 int status;
1350 1351