[PATCH] mount: nfsmount: ignore unknown mount options when remounting

Peter Korsgaard jacmet at sunsite.dk
Mon Feb 21 16:52:13 UTC 2011


Don't fail on unknown nfs mount options. The kernel automatically
adds a few mount options that we don't currently handle, like:

	sec=null|sys|krb5..
	mountaddr=<ip>
	mountproto=tcp|udp
	local_lock=none|all|flock|posix

Which causes a simple mount -o remount,rw <mountpoint> to fail.

Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
---
 util-linux/mount.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/util-linux/mount.c b/util-linux/mount.c
index 0f213bb..1949c12 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -1129,6 +1129,9 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
 				continue;
 			case 20: // "addr" - ignore
 				continue;
+			case -1: // unknown
+				if (vfsflags & MS_REMOUNT)
+					continue;
 			}
 
 			val = xatoi_positive(opteq);
-- 
1.7.2.3



More information about the busybox mailing list