aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 5085f53be2f..094d2f832c3 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1027,8 +1027,10 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args,
sin = args->mount_server.address;
else
sin = args->nfs_server.address;
- if (args->mount_server.port != 0)
- sin.sin_port = htons(args->mount_server.port);
+ /*
+ * autobind will be used if mount_server.port == 0
+ */
+ sin.sin_port = htons(args->mount_server.port);
/*
* Now ask the mount server to map our export path