summaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorTrond Myklebust2009-06-17 22:22:58 +0200
committerTrond Myklebust2009-06-17 22:22:58 +0200
commit01c3f05228ce7fc19baa103e4e4bf6c1b5062a53 (patch)
treed88d1fefeeea3468bbdafe6778fe13a0dfab0f86 /fs/nfs/super.c
parentSUNRPC: Fix a missing "break" option in xs_tcp_setup_socket() (diff)
downloadkernel-qcow2-linux-01c3f05228ce7fc19baa103e4e4bf6c1b5062a53.tar.gz
kernel-qcow2-linux-01c3f05228ce7fc19baa103e4e4bf6c1b5062a53.tar.xz
kernel-qcow2-linux-01c3f05228ce7fc19baa103e4e4bf6c1b5062a53.zip
NFSv4: Fix the 'nolock' option regression
NFSv4 should just ignore the 'nolock' option. It is an NFSv2/v3 thing... This fixes the Oops in http://bugzilla.kernel.org/show_bug.cgi?id=13330 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 26127b69a275..98b47d17740a 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2240,6 +2240,11 @@ static void nfs4_fill_super(struct super_block *sb)
nfs_initialise_sb(sb);
}
+static void nfs4_validate_mount_flags(struct nfs_parsed_mount_data *args)
+{
+ args->flags &= ~(NFS_MOUNT_NONLM|NFS_MOUNT_NOACL|NFS_MOUNT_VER3);
+}
+
/*
* Validate NFSv4 mount options
*/
@@ -2336,6 +2341,8 @@ static int nfs4_validate_mount_data(void *options,
nfs_validate_transport_protocol(args);
+ nfs4_validate_mount_flags(args);
+
if (args->auth_flavor_len > 1)
goto out_inval_auth;