NFS: remove redundant code in nfs_file_write()

filemap_fdatawait_range() will always return 0, after patch 6c984083ec
("NFS: Use of mapping_set_error() results in spurious errors"), it will not
save the wb err in struct address_space->flags:

  result = filemap_fdatawait_range(file->f_mapping, ...) = 0
    filemap_check_errors(mapping) = 0
      test_bit(..., &mapping->flags) // flags is 0

Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
ChenXiaoSong 2022-06-23 09:58:58 +08:00 committed by Trond Myklebust
parent f931d8374c
commit 064109db53

View File

@ -663,8 +663,6 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)
result = filemap_fdatawait_range(file->f_mapping,
iocb->ki_pos - written,
iocb->ki_pos - 1);
if (result < 0)
goto out;
}
result = generic_write_sync(iocb, written);
if (result < 0)