diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-09-11 18:00:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:17:01 -0400 |
commit | efd8340bb19c26a43e77c92fee9283b1f5777204 (patch) | |
tree | 86cdb3fde61d900f0ba350db7c9d9586d7d2dcec /fs | |
parent | b79dc8ced1412e7056f3969bef40a30cc75ee530 (diff) |
NFS: Kernel mount client should use async bind
Simplify the in-kernel mount client by using autobind instead of an
explicit call to rpc_getport_sync.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/super.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 42b8c671da35..5085f53be2fe 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1027,15 +1027,7 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args, | |||
1027 | sin = args->mount_server.address; | 1027 | sin = args->mount_server.address; |
1028 | else | 1028 | else |
1029 | sin = args->nfs_server.address; | 1029 | sin = args->nfs_server.address; |
1030 | if (args->mount_server.port == 0) { | 1030 | if (args->mount_server.port != 0) |
1031 | status = rpcb_getport_sync(&sin, | ||
1032 | args->mount_server.program, | ||
1033 | args->mount_server.version, | ||
1034 | args->mount_server.protocol); | ||
1035 | if (status < 0) | ||
1036 | goto out_err; | ||
1037 | sin.sin_port = htons(status); | ||
1038 | } else | ||
1039 | sin.sin_port = htons(args->mount_server.port); | 1031 | sin.sin_port = htons(args->mount_server.port); |
1040 | 1032 | ||
1041 | /* | 1033 | /* |
@@ -1049,14 +1041,11 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args, | |||
1049 | args->mount_server.version, | 1041 | args->mount_server.version, |
1050 | args->mount_server.protocol, | 1042 | args->mount_server.protocol, |
1051 | root_fh); | 1043 | root_fh); |
1052 | if (status < 0) | 1044 | if (status == 0) |
1053 | goto out_err; | 1045 | return 0; |
1054 | |||
1055 | return status; | ||
1056 | 1046 | ||
1057 | out_err: | 1047 | dfprintk(MOUNT, "NFS: unable to mount server " NIPQUAD_FMT |
1058 | dfprintk(MOUNT, "NFS: unable to contact server on host " | 1048 | ", error %d\n", NIPQUAD(sin.sin_addr.s_addr), status); |
1059 | NIPQUAD_FMT "\n", NIPQUAD(sin.sin_addr.s_addr)); | ||
1060 | return status; | 1049 | return status; |
1061 | } | 1050 | } |
1062 | 1051 | ||