[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1371490288-23167-34-git-send-email-kamal@canonical.com>
Date: Mon, 17 Jun 2013 10:30:37 -0700
From: Kamal Mostafa <kamal@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: Paul Taysom <taysom@...omium.org>,
Tyler Hicks <tyhicks@...onical.com>,
Kamal Mostafa <kamal@...onical.com>
Subject: [PATCH 33/84] ecryptfs: fixed msync to flush data
3.8.13.3 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Taysom <taysom@...omium.org>
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@...omium.org>
Signed-off-by: Tyler Hicks <tyhicks@...onical.com>
Signed-off-by: Kamal Mostafa <kamal@...onical.com>
---
fs/ecryptfs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
index d45ba45..4f9a25e 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -296,6 +296,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);
}
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists