Patch "NFS: Fix a race between mmap() and O_DIRECT" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
NFS: Fix a race between mmap() and O_DIRECT
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nfs-fix-a-race-between-mmap-and-o_direct.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
e231c6879cfd44e4fffd384bb6dd7d313249a523Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Sun, 28 Jan 2018 09:29:41 -0500
Subject: NFS: Fix a race between mmap() and O_DIRECT
From: Trond Myklebust <[email protected]>
commit e231c6879cfd44e4fffd384bb6dd7d313249a523 upstream.
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.
--- fs/nfs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/io.c +1 -1
@@ -99,7 +99,7 @@ static void nfs_block_buffered(struct nf {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); } }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/nfs-pnfs-fix-nfs_direct_req-ref-leak-when-i-o-falls-back-to-the-mds.patch queue-4.14/nfs-fix-nfsstat-breakage-due-to-lookupp.patch queue-4.14/nfs-add-a-cond_resched-to-nfs_commit_release_pages.patch queue-4.14/nfs41-do-not-return-enomem-on-layoutunavailable.patch queue-4.14/nfs-commit-direct-writes-even-if-they-fail-partially.patch queue-4.14/nfs-fix-a-race-between-mmap-and-o_direct.patch