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)
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

Simple merge