]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix a race between mmap() and O_DIRECT
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 28 Jan 2018 14:29:41 +0000 (09:29 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 29 Jan 2018 03:00:15 +0000 (22:00 -0500)
commited43615dd35ff5f8adfe4156c5bfbc5b1c50de30
tree7894f5ccb7813ba0cd1f1717443255af510b417d
parenta0f3f8f55cd9bff39c78ead5a0a171bc374d2c6c
NFS: Fix a race between mmap() and O_DIRECT

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: b6b32beebd191 ("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