]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ecryptfs: fixed msync to flush data
authorPaul Taysom <taysom@chromium.org>
Thu, 23 May 2013 21:31:43 +0000 (14:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jun 2013 17:49:31 +0000 (10:49 -0700)
commitef6190a2ac96fa2156c5e1423d1ea84a1cdf1bda
treedacb431efc0afc87ffac184156dccb8338d283c2
parentcd73e0b96b03189cbd4881b6176d841d700a4485
ecryptfs: fixed msync to flush data

commit c15cddd900e867c5adfb3c79596479dc5975f743 upstream.

When msync is called on a memory mapped file, that
data is not flushed to the disk.

In Linux, msync calls fsync for the file. For ecryptfs,
fsync just calls the lower level file system's fsync.
Changed the ecryptfs fsync code to call filemap_write_and_wait
before calling the lower level fsync.

Addresses the problem described in http://crbug.com/239536

Signed-off-by: Paul Taysom <taysom@chromium.org>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ecryptfs/file.c