]> git.itanic.dy.fi Git - linux-stable/commit
Btrfs: fix inode cache waiters hanging on failure to start caching thread
authorFilipe Manana <fdmanana@suse.com>
Thu, 4 Jul 2019 15:24:32 +0000 (16:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:46:46 +0000 (14:46 +0100)
commit2162f5aae4a7feb883739ca92054715f8151bd7a
tree2f93f00100ea8efe04196e0650f46210da4d75d0
parent0d479ec44e1c4257e69b400bf9ba429105d9e7aa
Btrfs: fix inode cache waiters hanging on failure to start caching thread

[ Upstream commit a68ebe0790fc88b4314d17984a2cf99ce2361901 ]

If we fail to start the inode caching thread, we print an error message
and disable the inode cache, however we never wake up any waiters, so they
hang forever waiting for the caching to finish. Fix this by waking them
up and have them fallback to a call to btrfs_find_free_objectid().

Fixes: e60efa84252c05 ("Btrfs: avoid triggering bug_on() when we fail to start inode caching task")
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/inode-map.c