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)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:29 +0000 (13:14 +0100)
commit6262ff01162e8582122f9792b6d9d55ec7425da3
tree8d0323b573508907b3eeca5f90fba39ca8239d02
parent91dd866b788cfcbe9642adb201f281b386084c81
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: Ben Hutchings <ben@decadent.org.uk>
fs/nfs/nfs4proc.c