]> git.hungrycats.org Git - linux/commitdiff
Revert "btrfs: compression: don't try to compress if we don't have enough pages"
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 5 Dec 2021 09:54:54 +0000 (04:54 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 5 Dec 2021 09:54:54 +0000 (04:54 -0500)
This reverts commit f58322300e96e13931fc9679600bd7167563c358.

fs/btrfs/inode.c

index 38384874a43494a53a79149091a41d49f47a0337..510c5e9141c14de9e8af95177bd8f655a0741d77 100644 (file)
@@ -597,7 +597,7 @@ again:
         * inode has not been flagged as nocompress.  This flag can
         * change at any time if we discover bad compression ratios.
         */
-       if (nr_pages > 1 && inode_need_compress(BTRFS_I(inode), start, end)) {
+       if (inode_need_compress(BTRFS_I(inode), start, end)) {
                WARN_ON(pages);
                pages = kcalloc(nr_pages, sizeof(struct page *), GFP_NOFS);
                if (!pages) {