]> git.baikalelectronics.ru Git - kernel.git/commit
eCryptfs: Flush dirty pages in setattr
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Fri, 22 Apr 2011 18:08:00 +0000 (13:08 -0500)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 25 Apr 2011 23:49:46 +0000 (18:49 -0500)
commit4eaba54e4333886c120a25951a343fc74846c06a
tree4b6a9e060ba1d33f3573f0ea4b04f950e8027c79
parent8010c18dde5b2dab8d363261492f9173693960d2
eCryptfs: Flush dirty pages in setattr

After 27e3b8bbd7b7aa554671e30fd9b44f0c006185b6 changed eCryptfs to
write-back caching, eCryptfs page writeback updates the lower inode
times due to the use of vfs_write() on the lower file.

To preserve inode metadata changes, such as 'cp -p' does with
utimensat(), we need to flush all dirty pages early in
ecryptfs_setattr() so that the user-updated lower inode metadata isn't
clobbered later in writeback.

https://bugzilla.kernel.org/show_bug.cgi?id=33372

Reported-by: Rocko <rockorequin@hotmail.com>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/inode.c