nfsd4: use recall_lock for delegation hashing
authorBenny Halevy <bhalevy@primarydata.com>
Fri, 30 May 2014 13:09:27 +0000 (09:09 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 4 Jun 2014 19:41:52 +0000 (15:41 -0400)
commit931ee56c67573eb4e51c8a4e78598d965b8b059e
treec9a2dd61a536acd1110ee611c1996cd6b57783ac
parenta832e7ae8b4f71fc522089d83fd445693aa7dbc5
nfsd4: use recall_lock for delegation hashing

This fixes a bug in the handling of the fi_delegations list.

nfs4_setlease does not hold the recall_lock when adding to it. The
client_mutex is held, which prevents against concurrent list changes,
but nfsd_break_deleg_cb does not hold while walking it. New delegations
could theoretically creep onto the list while we're walking it there.

Signed-off-by: Benny Halevy <bhalevy@primarydata.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c