Files
linux/fs/nfsd
Jeff Layton 1e837cb760 nfsd: ensure that delegation stateid hash references are only put once
commit 3fcbbd244e upstream.

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>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 19:33:28 +02:00
..
2014-07-08 17:14:27 -04:00
2014-08-17 12:00:12 -04:00
2015-02-02 18:09:42 +01:00
2015-02-05 14:35:18 +01:00
2015-04-21 16:16:02 -04:00
2015-02-09 14:58:50 -05: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