Skip to content

Commit b1a28f2

Browse files
author
Trond Myklebust
committed
NFS: nfs_async_write_reschedule_io must not recurse into the writeback code
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>
1 parent 72691a2 commit b1a28f2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/nfs/write.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,8 +1444,6 @@ static void nfs_async_write_error(struct list_head *head, int error)
14441444
static void nfs_async_write_reschedule_io(struct nfs_pgio_header *hdr)
14451445
{
14461446
nfs_async_write_error(&hdr->pages, 0);
1447-
filemap_fdatawrite_range(hdr->inode->i_mapping, hdr->args.offset,
1448-
hdr->args.offset + hdr->args.count - 1);
14491447
}
14501448

14511449
static const struct nfs_pgio_completion_ops nfs_async_write_completion_ops = {

0 commit comments

Comments
 (0)