From: Greg Kroah-Hartman Date: Thu, 30 Jan 2025 08:55:25 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v6.13.1~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ecbf7d1ab77803a820a63b6bdfeb8104ae4658f7;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch --- diff --git a/queue-5.10/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch b/queue-5.10/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch new file mode 100644 index 0000000000..54c2ec706b --- /dev/null +++ b/queue-5.10/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch @@ -0,0 +1,30 @@ +From 7c9d9223802fbed4dee1ae301661bf346964c9d2 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Mon, 13 Jan 2025 19:31:28 +0100 +Subject: gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag + +From: Andreas Gruenbacher + +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 , Jiaji Qin +Signed-off-by: Andreas Gruenbacher +Signed-off-by: Greg Kroah-Hartman +--- + fs/gfs2/file.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/gfs2/file.c ++++ b/fs/gfs2/file.c +@@ -271,6 +271,7 @@ static int do_gfs2_set_flags(struct file + 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); + } diff --git a/queue-5.10/series b/queue-5.10/series index b125cc37ad..e4a3d62f55 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -118,3 +118,4 @@ seccomp-stub-for-config_seccomp.patch scsi-iscsi-fix-redundant-response-for-iscsi_uevent_g.patch irqchip-sunxi-nmi-add-missing-skip_wake-flag.patch asoc-samsung-add-missing-depends-on-i2c.patch +gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch