summaryrefslogtreecommitdiffstats
path: root/mm/memfd.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2019-11-19 13:59:00 -0500
committerDavid Sterba <dsterba@suse.com>2019-12-13 14:09:22 +0100
commitdb8fe64f9ce61d1d89d3c3c34d111a43afb9f053 (patch)
tree46fd83f88378084f8ea02572acf8f7cb85c25637 /mm/memfd.c
parentf72ff01df9cf5db25c76674cac16605992d15467 (diff)
downloadlinux-db8fe64f9ce61d1d89d3c3c34d111a43afb9f053.tar.bz2
btrfs: handle error in btrfs_cache_block_group
We have a BUG_ON(ret < 0) in find_free_extent from btrfs_cache_block_group. If we fail to allocate our ctl we'll just panic, which is not good. Instead just go on to another block group. If we fail to find a block group we don't want to return ENOSPC, because really we got a ENOMEM and that's the root of the problem. Save our return from btrfs_cache_block_group(), and then if we still fail to make our allocation return that ret so we get the right error back. Tested with inject-error.py from bcc. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mm/memfd.c')
0 files changed, 0 insertions, 0 deletions