NFSv4: Ensure that we check lock exclusive/shared type against open modes
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 18 Apr 2012 16:48:35 +0000 (12:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2012 15:56:31 +0000 (08:56 -0700)
commit95cb2c603f27af05871e3e6718b6e1e1a6f59417
treef6ac9a662274dadbfd3cc4d1dbfaae1273952247
parent03a9f194904985d2844a2906ba02306289b0b4e7
NFSv4: Ensure that we check lock exclusive/shared type against open modes

commit 55725513b5ef9d462aa3e18527658a0362aaae83 upstream.

Since we may be simulating flock() locks using NFS byte range locks,
we can't rely on the VFS having checked the file open mode for us.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4proc.c