From: Greg Kroah-Hartman Date: Thu, 5 Sep 2024 06:46:46 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v6.1.109~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2fe871d574d6e098fbcb695f1a8d0f08c1407b4e;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: mm-fix-filemap_invalidate_inode-to-use-invalidate_inode_pages2_range.patch --- diff --git a/queue-6.10/mm-fix-filemap_invalidate_inode-to-use-invalidate_inode_pages2_range.patch b/queue-6.10/mm-fix-filemap_invalidate_inode-to-use-invalidate_inode_pages2_range.patch new file mode 100644 index 00000000000..2ffa8b2f6aa --- /dev/null +++ b/queue-6.10/mm-fix-filemap_invalidate_inode-to-use-invalidate_inode_pages2_range.patch @@ -0,0 +1,55 @@ +From c26096ee0278c5e765009c5eee427bbafe6dc090 Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Wed, 28 Aug 2024 22:02:45 +0100 +Subject: mm: Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range() + +From: David Howells + +commit c26096ee0278c5e765009c5eee427bbafe6dc090 upstream. + +Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range() +rather than truncate_inode_pages_range(). The latter clears the +invalidated bit of a partial pages rather than discarding it entirely. +This causes copy_file_range() to fail on cifs because the partial pages at +either end of the destination range aren't evicted and reread, but rather +just partly cleared. + +This causes generic/075 and generic/112 xfstests to fail. + +Fixes: 74e797d79cf1 ("mm: Provide a means of invalidation without using launder_folio") +Signed-off-by: David Howells +Link: https://lore.kernel.org/r/20240828210249.1078637-5-dhowells@redhat.com +cc: Matthew Wilcox +cc: Miklos Szeredi +cc: Trond Myklebust +cc: Christoph Hellwig +cc: Andrew Morton +cc: Alexander Viro +cc: Christian Brauner +cc: Jeff Layton +cc: linux-mm@kvack.org +cc: linux-fsdevel@vger.kernel.org +cc: netfs@lists.linux.dev +cc: v9fs@lists.linux.dev +cc: linux-afs@lists.infradead.org +cc: ceph-devel@vger.kernel.org +cc: linux-cifs@vger.kernel.org +cc: linux-nfs@vger.kernel.org +cc: devel@lists.orangefs.org +Signed-off-by: Christian Brauner +Signed-off-by: Greg Kroah-Hartman +--- + mm/filemap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/filemap.c ++++ b/mm/filemap.c +@@ -4221,7 +4221,7 @@ int filemap_invalidate_inode(struct inod + } + + /* Wait for writeback to complete on all folios and discard. */ +- truncate_inode_pages_range(mapping, start, end); ++ invalidate_inode_pages2_range(mapping, start / PAGE_SIZE, end / PAGE_SIZE); + + unlock: + filemap_invalidate_unlock(mapping); diff --git a/queue-6.10/series b/queue-6.10/series index a9d7a377cb0..2e4ef6a7ac0 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -178,3 +178,4 @@ drm-amd-display-skip-wbscl_set_scaler_filter-if-filt.patch crypto-ecc-fix-off-by-one-missing-to-clear-most-sign.patch media-uvcvideo-enforce-alignment-of-frame-and-interv.patch pinctrl-core-reset-gpio_device-in-loop-in-pinctrl_pi.patch +mm-fix-filemap_invalidate_inode-to-use-invalidate_inode_pages2_range.patch