]> 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 08:26:08 +0000 (03:26 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 5 Dec 2021 08:26:08 +0000 (03:26 -0500)
This reverts commit f58322300e96e13931fc9679600bd7167563c358.

fs/btrfs/inode.c

index b30a776a0b25ce843e6d6ddce4899ea9b39bdd2b..7b32892064b3b4da842ac93ac6eeb4de85a0552b 100644 (file)
@@ -598,7 +598,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) {