diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-02-08 08:55:47 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2021-02-08 11:41:38 -0500 |
commit | 28aa2f9e73e762dbaa28fdca20cccb59c74cc139 (patch) | |
tree | 0ed72e31ad417df995a53c6b584f01e03a8ad7f6 /fs/nfs/file.c | |
parent | fc9dc401899ab280fe1849a0ca5800384726a793 (diff) | |
download | linux-28aa2f9e73e762dbaa28fdca20cccb59c74cc139.tar.bz2 |
NFS: Always clear an invalid mapping when attempting a buffered write
If the page cache is invalid, then we can't do read-modify-write, so
ensure that we do clear it when we know it is invalid.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 02795a01c7ef..03fd1dcc96bd 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -632,6 +632,8 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from) goto out; } + nfs_clear_invalid_mapping(file->f_mapping); + since = filemap_sample_wb_err(file->f_mapping); nfs_start_io_write(inode); result = generic_write_checks(iocb, from); |