All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mount.nfs: Preserve any explicit port=2049 option
@ 2011-08-06 10:11 Luk Claes
  2011-08-06 17:01 ` Chuck Lever
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Luk Claes @ 2011-08-06 10:11 UTC (permalink / raw)
  To: Steve Dickson, linux-nfs; +Cc: Luk Claes

If NFS port (2049) is supplied explicitly, don't ignore this setting by requesting it to portmapper again. Thanks to Ben Hutchings <ben@decadent.org.uk> for the patch.

Signed-off-by: Luk Claes <luk@debian.org>
---
 utils/mount/stropts.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index f1aa503..8b2799c 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -437,8 +437,8 @@ static int nfs_construct_new_options(struct mount_options *options,
 	if (po_append(options, new_option) == PO_FAILED)
 		return 0;
 
-	po_remove_all(options, "port");
-	if (nfs_pmap->pm_port != NFS_PORT) {
+	if(po_remove_all(options, "port") == PO_FOUND ||
+	   nfs_pmap->pm_port != NFS_PORT) {
 		snprintf(new_option, sizeof(new_option) - 1,
 			 "port=%lu", nfs_pmap->pm_port);
 		if (po_append(options, new_option) == PO_FAILED)
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-14 18:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-06 10:11 [PATCH] mount.nfs: Preserve any explicit port=2049 option Luk Claes
2011-08-06 17:01 ` Chuck Lever
2011-08-06 17:06   ` Luk Claes
2011-08-07 14:51     ` Chuck Lever
2011-08-25 20:25 ` Steve Dickson
2011-08-25 20:46   ` Chuck Lever
2011-08-25 22:32     ` Jim Rees
2011-08-26  0:49     ` Steve Dickson
2011-08-26 13:58       ` Chuck Lever
2011-08-27 12:56         ` Steve Dickson
2011-08-27 23:45           ` Chuck Lever
2011-08-29 14:00             ` Steve Dickson
2011-09-14 18:26 ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.