NFSv4: Fix the 'nolock' option regression

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, June 22, 2009 - 2:04 pm

Gitweb:     http://git.kernel.org/linus/01c3f05228ce7fc19baa103e4e4bf6c1b5062a53
Commit:     01c3f05228ce7fc19baa103e4e4bf6c1b5062a53
Parent:     88b5ed73bcd0f21e008b6e303a02c8b7cb1199f4
Author:     Trond Myklebust <Trond.Myklebust@netapp.com>
AuthorDate: Wed Jun 17 13:22:58 2009 -0700
Committer:  Trond Myklebust <Trond.Myklebust@netapp.com>
CommitDate: Wed Jun 17 13:22:58 2009 -0700

    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>
---
 fs/nfs/super.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 26127b6..98b47d1 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;
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
NFSv4: Fix the 'nolock' option regression, Linux Kernel Mailing ..., (Mon Jun 22, 2:04 pm)