aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorJeff Layton <[email protected]>2015-08-24 12:41:48 -0400
committerJ. Bruce Fields <[email protected]>2015-08-31 16:32:16 -0400
commit3fcbbd244ed1d20dc0eb7d48d729503992fa9b7d (patch)
treeac901181a7228f5534a4b013c522cc2064beba8d /lib/mpi/mpiutil.c
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 <[email protected]> Tested-by: Anna Schumaker <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Cc: [email protected] Signed-off-by: J. Bruce Fields <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions