Skip to content

Commit

Permalink
NFSv4: Fix the 'nolock' option regression
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 17, 2009
1 parent 88b5ed7 commit 01c3f05
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 01c3f05

Please sign in to comment.