diff options
author | David Sterba <dsterba@suse.com> | 2020-02-05 17:34:34 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:34 +0100 |
commit | bf31f87f71cc7a89871ab0a451c047a0c0144bf1 (patch) | |
tree | fdca5c6ceff6356ea7ac35b8125fb30f2153e663 /fs/btrfs/block-group.c | |
parent | b908c334e7a419e5cd08a45d31284b4a93de3bd7 (diff) | |
download | linux-bf31f87f71cc7a89871ab0a451c047a0c0144bf1.tar.gz linux-bf31f87f71cc7a89871ab0a451c047a0c0144bf1.tar.bz2 linux-bf31f87f71cc7a89871ab0a451c047a0c0144bf1.zip |
btrfs: add wrapper for transaction abort predicate
The status of aborted transaction can change between calls and it needs
to be accessed by READ_ONCE. Add a helper that also wraps the unlikely
hint.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/block-group.c')
-rw-r--r-- | fs/btrfs/block-group.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 7f09147872dc..c12d6399c6d7 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -2345,7 +2345,7 @@ static int cache_save_setup(struct btrfs_block_group *block_group, return 0; } - if (trans->aborted) + if (TRANS_ABORTED(trans)) return 0; again: inode = lookup_free_space_inode(block_group, path); |