summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2015-08-24 12:41:48 -0400
committerJ. Bruce Fields <bfields@redhat.com>2015-08-31 16:32:16 -0400
commit3fcbbd244ed1d20dc0eb7d48d729503992fa9b7d (patch)
treeac901181a7228f5534a4b013c522cc2064beba8d /fs/9p
parente85687393f3ee0a77ccca016f903d1558bb69258 (diff)
nfsd: ensure that delegation stateid hash references are only put once
It's possible that a DELEGRETURN could race with (e.g.) client expiry, in which case we could end up putting the delegation hash reference more than once. Have unhash_delegation_locked return a bool that indicates whether it was already unhashed. In the case of destroy_delegation we only conditionally put the hash reference if that returns true. The other callers of unhash_delegation_locked call it while walking list_heads that shouldn't yet be detached. If we find that it doesn't return true in those cases, then throw a WARN_ON as that indicates that we have a partially hashed delegation, and that something is likely very wrong. Tested-by: Andrew W Elble <aweits@rit.edu> Tested-by: Anna Schumaker <Anna.Schumaker@netapp.com> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/9p')
0 files changed, 0 insertions, 0 deletions