[git commit master 1/1] mount: ignore unknown mount options when remounting NFS mounts

Denys Vlasenko vda.linux at googlemail.com
Sat Feb 26 18:02:36 UTC 2011


commit: http://git.busybox.net/busybox/commit/?id=301fe50ca2576291a427de46ca6ed64d4949713e
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

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>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 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 bc52850..0baa74c 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.3.4



More information about the busybox-cvs mailing list