NFSv4: Ensure delegation recall and byte range lock removal don't conflict
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 7 Feb 2013 15:54:07 +0000 (10:54 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 11 Feb 2013 20:33:13 +0000 (15:33 -0500)
commit65b62a29f719e937b5be1df472287f4c61e53ac6
treeea6b552a08883d92cfedb891044fa9697cbc5619
parent37380e4264dbda9753e470a30d4322097aab7152
NFSv4: Ensure delegation recall and byte range lock removal don't conflict

Add a mutex to the struct nfs4_state_owner to ensure that delegation
recall doesn't conflict with byte range lock removal.

Note that we nest the new mutex _outside_ the state manager reclaim
protection (nfsi->rwsem) in order to avoid deadlocks.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/delegation.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c