aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/super.c21
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
1057out_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