]> git.baikalelectronics.ru Git - kernel.git/commit
fs/locks: always delete_block after waiting.
authorNeilBrown <neilb@suse.com>
Thu, 29 Nov 2018 23:04:08 +0000 (10:04 +1100)
committerJeff Layton <jlayton@kernel.org>
Fri, 7 Dec 2018 11:49:17 +0000 (06:49 -0500)
commit391e040d17beeb7264d37517d8d58db112c25947
treed508c05395c69817dd98bece9efcac1c4a7074b3
parent7fb6bb143600b718cf9c84f2a3ead54a8c97a32a
fs/locks: always delete_block after waiting.

Now that requests can block other requests, we
need to be careful to always clean up those blocked
requests.
Any time that we wait for a request, we might have
other requests attached, and when we stop waiting,
we must clean them up.
If the lock was granted, the requests might have been
moved to the new lock, though when merged with a
pre-exiting lock, this might not happen.
In all cases we don't want blocked locks to remain
attached, so we remove them to be safe.

Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: J. Bruce Fields <bfields@redhat.com>
Tested-by: syzbot+a4a3d526b4157113ec6a@syzkaller.appspotmail.com
Tested-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/locks.c