mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
ecryptfs: fixed msync to flush data
commit c15cddd900
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>
This commit is contained in:
parent
cd73e0b96b
commit
ef6190a2ac
@ -294,6 +294,7 @@ static int ecryptfs_release(struct inode *inode, struct file *file)
|
||||
static int
|
||||
ecryptfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||
{
|
||||
filemap_write_and_wait(file->f_mapping);
|
||||
return vfs_fsync(ecryptfs_file_to_lower(file), datasync);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user