NACK: [SRU][jammy PATCH v3 1/1] NFS: nfs_async_write_reschedule_io must not recurse into the writeback code
Juerg Haefliger
juerg.haefliger at canonical.com
Fri Jan 17 13:27:31 UTC 2025
ML cleanup. Email not threaded.
...Juerg
> From: Trond Myklebust <trond.myklebust at hammerspace.com>
>
> BugLink: https://bugs.launchpad.net/bugs/2089410
>
> commit 31545f4b7cdb6da6a0519120b8c96dc40f186aac upstream stable/linux-5.15.y.
>
> 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 at hammerspace.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> (cherry picked from commit 31545f4b7cdb6da6a0519120b8c96dc40f186aac)
> Fixes: 7be7b3ca16a59 ("NFS: Ensure we immediately start writeback on rescheduled writes")
> Link: https://lore.kernel.org/stable/2024112146-tiptoeing-available-c5fe@gregkh/T/
> Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2089410
> Signed-off-by: Mike Snitzer <snitzer at hammerspace.com>
> Signed-off-by: Mike Snitzer <snitzer at kernel.org>
> ---
> fs/nfs/write.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
> index 2e1c45344d1fd..00e11c6602fe4 100644
> --- a/fs/nfs/write.c
> +++ b/fs/nfs/write.c
> @@ -1437,8 +1437,6 @@ static void nfs_async_write_error(struct list_head *head, int error)
> 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 = {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250117/7c251401/attachment.sig>
More information about the kernel-team
mailing list