diff options
author | Christoph Hellwig <hch@lst.de> | 2023-06-28 17:31:32 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:15 +0200 |
commit | 67583468086c2a12602b915184118c4863402b02 (patch) | |
tree | fc08519680e96eacbf134ec43168986e48304919 /fs/btrfs/inode.c | |
parent | c56cbe90599338c0aaa84cab0e99a9e8a8501a38 (diff) |
btrfs: clean up the check for uncompressed ranges in submit_one_async_extent
Instead of checking for a NULL !pages and explaining this with a cryptic
comment, just check the compression type for BTRFS_COMPRESS_NONE to make
the check self-explanatory.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ada70af9c8a2..27fdfd08a3ef 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1206,8 +1206,7 @@ static void submit_one_async_extent(struct async_chunk *async_chunk, } lock_extent(io_tree, start, end, NULL); - /* We have fall back to uncompressed write */ - if (!async_extent->pages) { + if (async_extent->compress_type == BTRFS_COMPRESS_NONE) { submit_uncompressed_range(inode, async_extent, locked_page); goto done; } |