]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
nfsd: wake waiters blocked on file_lock before deleting it
authorJeff Layton <jlayton@kernel.org>
Mon, 22 Apr 2019 16:34:23 +0000 (12:34 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 2 Jul 2019 10:07:53 +0000 (12:07 +0200)
commit10e8fc2383785d1999e8db7ef4479108f32a8fc7
treeeb47e84ff8010844d85eadfb5dcd278487a9b4bc
parentf237eb513b731d9e83a61c551c427a2bdacd7648
nfsd: wake waiters blocked on file_lock before deleting it

BugLink: https://bugs.launchpad.net/bugs/1830929
commit 6aaafc43a4ecc5bc8a3f6a2811d5eddc996a97f3 upstream.

After a blocked nfsd file_lock request is deleted, knfsd will send a
callback to the client and then free the request. Commit 16306a61d3b7
("fs/locks: always delete_block after waiting.") changed it such that
locks_delete_block is always called on a request after it is awoken,
but that patch missed fixing up blocked nfsd request handling.

Call locks_delete_block on the block to wake up any locks still blocked
on the nfsd lock request before freeing it. Some of its callers already
do this however, so just remove those calls.

URL: https://bugzilla.kernel.org/show_bug.cgi?id=203363
Fixes: 16306a61d3b7 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/nfsd/nfs4state.c