]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Feb 2021 12:38:50 +0000 (13:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Feb 2021 12:38:50 +0000 (13:38 +0100)
added patches:
btrfs-fix-backport-of-2175bf57dc952-in-5.4.95.patch

queue-5.4/btrfs-fix-backport-of-2175bf57dc952-in-5.4.95.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/btrfs-fix-backport-of-2175bf57dc952-in-5.4.95.patch b/queue-5.4/btrfs-fix-backport-of-2175bf57dc952-in-5.4.95.patch
new file mode 100644 (file)
index 0000000..a077581
--- /dev/null
@@ -0,0 +1,55 @@
+From dsterba@suse.com  Mon Feb 22 13:37:28 2021
+From: David Sterba <dsterba@suse.com>
+Date: Mon, 22 Feb 2021 13:16:39 +0100
+Subject: btrfs: fix backport of 2175bf57dc952 in 5.4.95
+To: stable@vger.kernel.org
+Cc: David Sterba <dsterba@suse.cz>, Wang Yugui <wangyugui@e16-tech.com>, David Sterba <dsterba@suse.com>
+Message-ID: <20210222121639.30086-1-dsterba@suse.com>
+
+From: David Sterba <dsterba@suse.cz>
+
+There's a mistake in backport of upstream commit 2175bf57dc95 ("btrfs:
+fix possible free space tree corruption with online conversion") as
+5.4.95 commit e1ae9aab8029.
+
+The enum value BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED has been added to the
+wrong enum set, colliding with value of BTRFS_FS_QUOTA_ENABLE. This
+could cause problems during the tree conversion, where the quotas
+wouldn't be set up properly but the related code executed anyway due to
+the bit set.
+
+Link: https://lore.kernel.org/linux-btrfs/20210219111741.95DD.409509F4@e16-tech.com
+Reported-by: Wang Yugui <wangyugui@e16-tech.com>
+CC: stable@vger.kernel.org # 5.4.95+
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+
+This is same fix that went to 5.10.x, with refreshed diff so it applies
+cleanly on 5.4.x and with updated references.
+
+ fs/btrfs/ctree.h |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/fs/btrfs/ctree.h
++++ b/fs/btrfs/ctree.h
+@@ -136,9 +136,6 @@ enum {
+       BTRFS_FS_STATE_DEV_REPLACING,
+       /* The btrfs_fs_info created for self-tests */
+       BTRFS_FS_STATE_DUMMY_FS_INFO,
+-
+-      /* Indicate that we can't trust the free space tree for caching yet */
+-      BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,
+ };
+ #define BTRFS_BACKREF_REV_MAX         256
+@@ -527,6 +524,9 @@ enum {
+        * so we don't need to offload checksums to workqueues.
+        */
+       BTRFS_FS_CSUM_IMPL_FAST,
++
++      /* Indicate that we can't trust the free space tree for caching yet */
++      BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,
+ };
+ struct btrfs_fs_info {
index 8e66c4228814127d36bd971a94b962e721543ae5..bd82a6c37e9704ee4f3cd9022558565338e46c01 100644 (file)
@@ -11,3 +11,4 @@ xen-netback-don-t-handle-error-by-bug.patch
 xen-scsiback-don-t-handle-error-by-bug.patch
 xen-blkback-fix-error-handling-in-xen_blkbk_map.patch
 media-pwc-use-correct-device-for-dma.patch
+btrfs-fix-backport-of-2175bf57dc952-in-5.4.95.patch