]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Nov 2024 01:47:38 +0000 (02:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Nov 2024 01:48:43 +0000 (02:48 +0100)
added patches:
nfs-nfs_async_write_reschedule_io-must-not-recurse-into-the-writeback-code.patch

queue-5.15/nfs-nfs_async_write_reschedule_io-must-not-recurse-into-the-writeback-code.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/nfs-nfs_async_write_reschedule_io-must-not-recurse-into-the-writeback-code.patch b/queue-5.15/nfs-nfs_async_write_reschedule_io-must-not-recurse-into-the-writeback-code.patch
new file mode 100644 (file)
index 0000000..67217ea
--- /dev/null
@@ -0,0 +1,30 @@
+From b1a28f2eb9ea7a5a1763fe53fe699aa0feae4231 Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <trond.myklebust@hammerspace.com>
+Date: Mon, 1 Aug 2022 14:16:51 -0400
+Subject: NFS: nfs_async_write_reschedule_io must not recurse into the writeback code
+
+From: Trond Myklebust <trond.myklebust@hammerspace.com>
+
+commit b1a28f2eb9ea7a5a1763fe53fe699aa0feae4231 upstream.
+
+It is not safe to call filemap_fdatawrite_range() from
+nfs_async_write_reschedule_io(), since we're often calling from a page
+reclaim context. Just let fsync() redrive the writeback for us.
+
+Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/nfs/write.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/fs/nfs/write.c
++++ b/fs/nfs/write.c
+@@ -1422,8 +1422,6 @@ static void nfs_async_write_error(struct
+ static void nfs_async_write_reschedule_io(struct nfs_pgio_header *hdr)
+ {
+       nfs_async_write_error(&hdr->pages, 0);
+-      filemap_fdatawrite_range(hdr->inode->i_mapping, hdr->args.offset,
+-                      hdr->args.offset + hdr->args.count - 1);
+ }
+ static const struct nfs_pgio_completion_ops nfs_async_write_completion_ops = {
index 18c8a6e05b240a0701e322a09802922e57d27dbf..77b0ad699bc7f7f5eba8381c015236d9f8d3eb48 100644 (file)
@@ -31,3 +31,4 @@ mm-avoid-unsafe-vma-hook-invocation-when-error-arises-on-mmap-hook.patch
 mm-unconditionally-close-vmas-on-error.patch
 mm-refactor-arch_calc_vm_flag_bits-and-arm64-mte-handling.patch
 mm-resolve-faulty-mmap_region-error-path-behaviour.patch
+nfs-nfs_async_write_reschedule_io-must-not-recurse-into-the-writeback-code.patch