Files
linux/fs/nfsd
Jeff Layton 3fcbbd244e 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>
2015-08-31 16:32:16 -04:00
..
2014-07-08 17:14:27 -04:00
2014-08-17 12:00:12 -04:00
2015-02-05 14:35:18 +01:00
2015-07-20 14:58:46 -04:00
2015-07-20 14:58:46 -04:00
2015-08-13 10:26:24 -04:00
2015-04-21 16:16:02 -04:00
2015-02-16 11:43:13 -05:00
2015-02-02 18:09:44 +01:00
2015-02-02 18:09:44 +01:00
2015-02-02 18:09:43 +01:00