]> asedeno.scripts.mit.edu Git - linux.git/commit
nfsd: Fix race in lock stateid creation
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 3 Nov 2017 12:00:14 +0000 (08:00 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 27 Nov 2017 21:45:10 +0000 (16:45 -0500)
commitbeeca19cf1249a917ed737729dc92337c7633bea
treec118b4316b711a950f6792a8d4c2c47fea81886c
parentfd1fd685b30867122aafbe2998ce4065c8c87e8f
nfsd: Fix race in lock stateid creation

If we're looking up a new lock state, and the creation fails, then
we want to unhash it, just like we do for OPEN. However in order
to do so, we need to that no other LOCK requests can grab the
mutex until we have unhashed it (and marked it as closed).

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c