From: Jeff Layton Date: Wed, 30 Jul 2014 01:34:14 +0000 (-0400) Subject: nfsd: ensure atomicity in nfsd4_free_stateid and nfsd4_validate_stateid X-Git-Tag: omap-for-v3.17/fixes-against-rc2~101^2~70 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1af71cc8014e78e975ca47929c957228019a579b;p=pandora-kernel.git nfsd: ensure atomicity in nfsd4_free_stateid and nfsd4_validate_stateid Hold the cl_lock over the bulk of these functions. In addition to ensuring that they aren't freed prematurely, this will also help prevent a potential race that could be introduced later. Once we remove the client_mutex, it'll be possible for FREE_STATEID and CLOSE to race and for both to try to put the "persistent" reference to the stateid. Signed-off-by: Trond Myklebust Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed