]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: don't use locks_in_grace to determine whether to call nfs4_grace_end
authorJeff Layton <jlayton@redhat.com>
Tue, 10 Apr 2012 15:08:48 +0000 (11:08 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 11 Apr 2012 21:55:00 +0000 (17:55 -0400)
commita53da6b6ecc0a05313c2cf97cc8eef38dcb2730d
tree33aaf10432675f5e8ab3b83a6d970d4a83cb21f0
parentf3762db8122b9d6a6800c5a455e08df04d8eb964
nfsd: don't use locks_in_grace to determine whether to call nfs4_grace_end

It's possible that lockd or another lock manager might still be on the
list after we call nfsd4_end_grace. If the laundromat thread runs
again at that point, then we could end up calling nfsd4_end_grace more
than once.

That's not only inefficient, but calling nfsd4_recdir_purge_old more
than once could be problematic. Fix this by adding a new global
"grace_ended" flag and use that to determine whether we've already
called nfsd4_grace_end.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c