]> git.baikalelectronics.ru Git - 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)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 22 Apr 2019 19:31:54 +0000 (15:31 -0400)
commit5846b09addf0bbbeb008097819b5ccf1a3116d1b
treee812c4ee597ec88497e6a26554547ee03183d2cf
parentc9621467aba9fb3ea009165f90b70c726b097fdc
nfsd: wake waiters blocked on file_lock before deleting it

After a blocked nfsd file_lock request is deleted, knfsd will send a
callback to the client and then free the request. Commit 391e040d17be
("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: 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