]> git.baikalelectronics.ru Git - kernel.git/commit
ecryptfs: fixed msync to flush data
authorPaul Taysom <taysom@chromium.org>
Thu, 23 May 2013 21:31:43 +0000 (14:31 -0700)
committerTyler Hicks <tyhicks@canonical.com>
Fri, 24 May 2013 23:21:45 +0000 (16:21 -0700)
commit528f9e7a85e8dc24d07ae491eaffe07ee9a89669
treebc9607f2d1c40850da4c247d842dd1275c1785b5
parent08abddfafffad33b11c51c83b770d07910d35904
ecryptfs: fixed msync to flush data

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>
Cc: stable@vger.kernel.org # v3.6+
fs/ecryptfs/file.c