diff options
author | Trond Myklebust <[email protected]> | 2022-05-14 10:27:02 -0400 |
---|---|---|
committer | Anna Schumaker <[email protected]> | 2022-05-17 12:01:59 -0400 |
commit | e6005436f6cc9ed13288f936903f0151e5543485 (patch) | |
tree | 6cdf43e1cfc2637b7e2886cc58606d2545c02e9c /net/lapb/lapb_out.c | |
parent | 9641d9bc9b75f11f70646f5c6ee9f5f519a1012e (diff) |
NFS: Don't report ENOSPC write errors twice
Any errors reported by the write() system call need to be cleared from
the file descriptor's error tracking. The current call to nfs_wb_all()
causes the error to be reported, but since it doesn't call
file_check_and_advance_wb_err(), we can end up reporting the same error
a second time when the application calls fsync().
Note that since Linux 4.13, the rule is that EIO may be reported for
write(), but it must be reported by a subsequent fsync(), so let's just
drop reporting it in write.
The check for nfs_ctx_key_to_expire() is just a duplicate to the one
already in nfs_write_end(), so let's drop that too.
Reported-by: ChenXiaoSong <[email protected]>
Fixes: ce368536dd61 ("nfs: nfs_file_write() should check for writeback errors")
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions