From: Christoph Hellwig Date: Wed, 28 Jun 2023 15:31:32 +0000 (+0200) Subject: btrfs: clean up the check for uncompressed ranges in submit_one_async_extent X-Git-Tag: v6.6.17~3697^2~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67583468086c2a12602b915184118c4863402b02;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ada70af..27fdfd0 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; }