]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Btrfs: fix inode cache waiters hanging on path allocation failure
authorFilipe Manana <fdmanana@suse.com>
Thu, 4 Jul 2019 15:24:44 +0000 (16:24 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit2c3df5e8eae947318b2f4998591ac345d6fbb824
treeaca85113e70a04174ce8b9a32eaa567c3da4ea5c
parent6d3e095588e33505be23ccf8f65aa3711b9a6f0e
Btrfs: fix inode cache waiters hanging on path allocation failure

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 9d123a35d7e97bb2139747b16127c9b22b6a593e ]

If the caching thread fails to allocate a path, it returns without waking
up any cache waiters, leaving them hang forever. Fix this by following the
same approach as when we fail to start the caching thread: print an error
message, disable inode caching and make the wakers fallback to non-caching
mode behaviour (calling btrfs_find_free_objectid()).

Fixes: 581bb050941b4f ("Btrfs: Cache free inode numbers in memory")
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/btrfs/inode-map.c