summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2023-08-02 16:20:24 +0300
committerDavid Sterba <dsterba@suse.com>2023-08-10 18:16:45 +0300
commit92fb94b69c6accf1e49fff699640fa0ce03dc910 (patch)
tree06a70ff6d0570c2577a0cb13d3c029df0b8f219d /.clang-format
parent6ebcd021c92b8e4b904552e4d87283032100796d (diff)
downloadlinux-92fb94b69c6accf1e49fff699640fa0ce03dc910.tar.xz
btrfs: set cache_block_group_error if we find an error
We set cache_block_group_error if btrfs_cache_block_group() returns an error, this is because we could end up not finding space to allocate and mistakenly return -ENOSPC, and which could then abort the transaction with the incorrect errno, and in the case of ENOSPC result in a WARN_ON() that will trip up tests like generic/475. However there's the case where multiple threads can be racing, one thread gets the proper error, and the other thread doesn't actually call btrfs_cache_block_group(), it instead sees ->cached == BTRFS_CACHE_ERROR. Again the result is the same, we fail to allocate our space and return -ENOSPC. Instead we need to set cache_block_group_error to -EIO in this case to make sure that if we do not make our allocation we get the appropriate error returned back to the caller. CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions