Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d95b266

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFS: Do not report flush errors in nfs_write_end()
If we do flush cached writebacks in nfs_write_end() due to the imminent expiration of an RPCSEC_GSS session, then we should defer reporting any resulting errors until the calls to file_check_and_advance_wb_err() in nfs_file_write() and nfs_file_fsync(). Fixes: 6fbda89 ("NFS: Replace custom error reporting mechanism with generic one") Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent e600543 commit d95b266

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

fs/nfs/file.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,8 @@ static int nfs_write_end(struct file *file, struct address_space *mapping,
386386
return status;
387387
NFS_I(mapping->host)->write_io += copied;
388388

389-
if (nfs_ctx_key_to_expire(ctx, mapping->host)) {
390-
status = nfs_wb_all(mapping->host);
391-
if (status < 0)
392-
return status;
393-
}
389+
if (nfs_ctx_key_to_expire(ctx, mapping->host))
390+
nfs_wb_all(mapping->host);
394391

395392
return copied;
396393
}

0 commit comments

Comments
 (0)