]> git.hungrycats.org Git - linux/commit
Btrfs: wake up extent state waiters on unlock through clear_extent_bits
authorFilipe Manana <fdmanana@suse.com>
Thu, 14 May 2015 19:41:07 +0000 (20:41 +0100)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 15 May 2015 04:54:11 +0000 (00:54 -0400)
commit304721d43703db5e5753e410a7dccb18cef606a8
tree0bc4f4b93bfa89694d16e29644d6b4ef9f287b55
parentbf43ed5f2fb8c0c61f52cbd9f533313ca560f447
Btrfs: wake up extent state waiters on unlock through clear_extent_bits

When we clear an extent state's EXTENT_LOCKED bit with clear_extent_bits()
through free_io_failure(), we weren't waking up any tasks waiting for the
extent's state EXTENT_LOCKED bit, leading to an hang.

So make sure clear_extent_bits() ends up waking up any waiters if the
bit EXTENT_LOCKED is supplied by its callers.

Zygo Blaxell was experiencing such hangs at inode eviction time after
file unlinks. Thanks to him for a set of scripts to reproduce the issue.

Reported-by: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
fs/btrfs/extent_io.c