mount: ignore unknown mount options when remounting NFS mounts
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 21 Feb 2011 16:52:13 +0000 (17:52 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 26 Feb 2011 18:02:36 +0000 (19:02 +0100)
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@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/mount.c

index bc528505285deba681e90a68d473c6cc461d44c5..0baa74c7c53544bef9208d9856e2eb36c8370e2b 100644 (file)
@@ -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);