diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-05-14 17:27:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-09 11:30:36 +0300 |
commit | 8e98d029a38a5668d8b4f4bead4f32b1ebf61b50 (patch) | |
tree | 37b02eaeec34e05b6757198d5fefad7fa51c30fc | |
parent | 7fb27bb6c6b70f0ef7ac4472e4f809899762c381 (diff) | |
download | linux-8e98d029a38a5668d8b4f4bead4f32b1ebf61b50.tar.xz |
NFS: Do not report flush errors in nfs_write_end()
[ Upstream commit d95b26650e86175e4a97698d89bc1626cd1df0c6 ]
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: 6fbda89b257f ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | fs/nfs/file.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 87e4cd5e8fe2..3f17748eaf29 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -386,11 +386,8 @@ static int nfs_write_end(struct file *file, struct address_space *mapping, return status; NFS_I(mapping->host)->write_io += copied; - if (nfs_ctx_key_to_expire(ctx, mapping->host)) { - status = nfs_wb_all(mapping->host); - if (status < 0) - return status; - } + if (nfs_ctx_key_to_expire(ctx, mapping->host)) + nfs_wb_all(mapping->host); return copied; } |