projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
128159f
)
NFS: Fix a race between mmap() and O_DIRECT
author
Trond Myklebust
<trond.myklebust@primarydata.com>
Sun, 28 Jan 2018 14:29:41 +0000
(09:29 -0500)
committer
Trond Myklebust
<trond.myklebust@primarydata.com>
Mon, 29 Jan 2018 03:00:15 +0000
(22:00 -0500)
When locking the file in order to do O_DIRECT on it, we must unmap
any mmapped ranges on the pagecache so that we can flush out the
dirty data.
Fixes: a5864c999de67 ("NFS: Do not serialise O_DIRECT reads and writes")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: stable@vger.kernel.org # v4.8+
fs/nfs/io.c
patch
|
blob
|
history
diff --git
a/fs/nfs/io.c
b/fs/nfs/io.c
index 20fef85d2bb15782c4ede8bdbaa083867e522d82..9034b4926909a91a86e7cbf95cd227178f953270 100644
(file)
--- a/
fs/nfs/io.c
+++ b/
fs/nfs/io.c
@@
-99,7
+99,7
@@
static void nfs_block_buffered(struct nfs_inode *nfsi, struct inode *inode)
{
if (!test_bit(NFS_INO_ODIRECT, &nfsi->flags)) {
set_bit(NFS_INO_ODIRECT, &nfsi->flags);
- nfs_
wb_all(inode
);
+ nfs_
sync_mapping(inode->i_mapping
);
}
}