]> git.karo-electronics.de Git - karo-tx-linux.git/commit
NFSv4.x: Fix handling of partially delegated locks
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 30 Apr 2013 16:43:42 +0000 (12:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2013 14:18:38 +0000 (07:18 -0700)
commitdc994243d9f88f22eb2481867ea26a86cac24cbd
tree05410a3f9a0deed09960379d84a02b1bee975acd
parent8441a6f427a545de73ef4e2ea2b815d2e5d8dafe
NFSv4.x: Fix handling of partially delegated locks

commit c5a2a15f8146fdfe45078df7873a6dc1006b3869 upstream.

If a NFS client receives a delegation for a file after it has taken
a lock on that file, we can currently end up in a situation where
we mistakenly skip unlocking that file.

The following patch swaps an erroneous check in nfs4_proc_unlck for
whether or not the file has a delegation to one which checks whether
or not we hold a lock stateid for that file.

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