Skip to content

Commit c5e483b

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFS: Don't report errors from nfs_pageio_complete() more than once
Since errors from nfs_pageio_complete() are already being reported through nfs_async_write_error(), we should not be returning them to the callers of do_writepages() as well. They will end up being reported through the generic mechanism instead. Fixes: 6fbda89 ("NFS: Replace custom error reporting mechanism with generic one") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent d95b266 commit c5e483b

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

fs/nfs/write.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -681,11 +681,7 @@ static int nfs_writepage_locked(struct page *page,
681681
err = nfs_do_writepage(page, wbc, &pgio);
682682
pgio.pg_error = 0;
683683
nfs_pageio_complete(&pgio);
684-
if (err < 0)
685-
return err;
686-
if (nfs_error_is_fatal(pgio.pg_error))
687-
return pgio.pg_error;
688-
return 0;
684+
return err;
689685
}
690686

691687
int nfs_writepage(struct page *page, struct writeback_control *wbc)
@@ -747,9 +743,6 @@ int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc)
747743

748744
if (err < 0)
749745
goto out_err;
750-
err = pgio.pg_error;
751-
if (nfs_error_is_fatal(err))
752-
goto out_err;
753746
return 0;
754747
out_err:
755748
return err;

0 commit comments

Comments
 (0)