]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2025 08:54:02 +0000 (09:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2025 08:54:02 +0000 (09:54 +0100)
added patches:
gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch

queue-5.15/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch b/queue-5.15/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch
new file mode 100644 (file)
index 0000000..ea60c84
--- /dev/null
@@ -0,0 +1,30 @@
+From 7c9d9223802fbed4dee1ae301661bf346964c9d2 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruenba@redhat.com>
+Date: Mon, 13 Jan 2025 19:31:28 +0100
+Subject: gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag
+
+From: Andreas Gruenbacher <agruenba@redhat.com>
+
+commit 7c9d9223802fbed4dee1ae301661bf346964c9d2 upstream.
+
+Truncate an inode's address space when flipping the GFS2_DIF_JDATA flag:
+depending on that flag, the pages in the address space will either use
+buffer heads or iomap_folio_state structs, and we cannot mix the two.
+
+Reported-by: Kun Hu <huk23@m.fudan.edu.cn>, Jiaji Qin <jjtan24@m.fudan.edu.cn>
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/gfs2/file.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/gfs2/file.c
++++ b/fs/gfs2/file.c
+@@ -257,6 +257,7 @@ static int do_gfs2_set_flags(struct inod
+               error = filemap_fdatawait(inode->i_mapping);
+               if (error)
+                       goto out;
++              truncate_inode_pages(inode->i_mapping, 0);
+               if (new_flags & GFS2_DIF_JDATA)
+                       gfs2_ordered_del_inode(ip);
+       }
index ea94ec6ca165fa877b7e6c36599f6220e4b8ec98..15fcf1f5c3c4a3d9fbea2aca59eecbba678300d2 100644 (file)
@@ -6,3 +6,4 @@ irqchip-sunxi-nmi-add-missing-skip_wake-flag.patch
 asoc-samsung-add-missing-depends-on-i2c.patch
 regmap-detach-regmap-from-dev-on-regmap_exit.patch
 mptcp-don-t-always-assume-copied-data-in-mptcp_cleanup_rbuf.patch
+gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch