]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: wake blocked file lock waiters before sending callback
authorJeff Layton <jlayton@kernel.org>
Mon, 22 Apr 2019 16:34:24 +0000 (12:34 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 22 Apr 2019 19:38:41 +0000 (15:38 -0400)
commita599a9f1422abdca618baaeb04f5fcd09a7979dc
treebac517015f1d270e1becc4e53da7a881d205684b
parent5846b09addf0bbbeb008097819b5ccf1a3116d1b
nfsd: wake blocked file lock waiters before sending callback

When a blocked NFS lock is "awoken" we send a callback to the server and
then wake any hosts waiting on it. If a client attempts to get a lock
and then drops off the net, we could end up waiting for a long time
until we end up waking locks blocked on that request.

So, wake any other waiting lock requests before sending the callback.
Do this by calling locks_delete_block in a new "prepare" phase for
CB_NOTIFY_LOCK callbacks.

URL: https://bugzilla.kernel.org/show_bug.cgi?id=203363
Fixes: 391e040d17be ("fs/locks: always delete_block after waiting.")
Reported-by: Slawomir Pryczek <slawek1211@gmail.com>
Cc: Neil Brown <neilb@suse.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c