linux/fs/ecryptfs
Tyler Hicks 7149f2558d eCryptfs: Write out all dirty pages just before releasing the lower file
Fixes a regression caused by:

821f749 eCryptfs: Revert to a writethrough cache model

That patch reverted some code (specifically, 32001d6f) that was
necessary to properly handle open() -> mmap() -> close() -> dirty pages
-> munmap(), because the lower file could be closed before the dirty
pages are written out.

Rather than reapplying 32001d6f, this approach is a better way of
ensuring that the lower file is still open in order to handle writing
out the dirty pages. It is called from ecryptfs_release(), while we have
a lock on the lower file pointer, just before the lower file gets the
final fput() and we overwrite the pointer.

https://launchpad.net/bugs/1047261

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Artemy Tregubenko <me@arty.name>
Tested-by: Artemy Tregubenko <me@arty.name>
Tested-by: Colin Ian King <colin.king@canonical.com>
2012-09-14 09:11:29 -07:00
..
crypto.c eCryptfs: Improve statfs reporting 2012-02-16 16:06:21 -06:00
debug.c eCryptfs: update comment and debug statement 2007-10-16 09:43:11 -07:00
dentry.c stop passing nameidata * to ->d_revalidate() 2012-07-14 16:34:14 +04:00
ecryptfs_kernel.h - Fixes a bug when the lower filesystem mount options include 'acl', but the 2012-08-02 10:56:34 -07:00
file.c eCryptfs: Revert to a writethrough cache model 2012-07-13 16:46:06 -07:00
inode.c - Fixes a bug when the lower filesystem mount options include 'acl', but the 2012-08-02 10:56:34 -07:00
Kconfig eCryptfs: fix compile error 2011-08-09 13:42:46 -05:00
keystore.c eCryptfs: Improve statfs reporting 2012-02-16 16:06:21 -06:00
kthread.c switch dentry_open() to struct path, make it grab references itself 2012-07-23 00:01:29 +04:00
main.c eCryptfs: Write out all dirty pages just before releasing the lower file 2012-09-14 09:11:29 -07:00
Makefile eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
messaging.c eCryptfs: Make all miscdev functions use daemon ptr in file private_data 2012-07-08 12:51:44 -05:00
miscdev.c eCryptfs: Make all miscdev functions use daemon ptr in file private_data 2012-07-08 12:51:44 -05:00
mmap.c eCryptfs: Revert to a writethrough cache model 2012-07-13 16:46:06 -07:00
read_write.c ecryptfs: remove the second argument of k[un]map_atomic() 2012-02-16 16:06:27 -06:00
super.c vfs: Rename end_writeback() to clear_inode() 2012-05-06 13:43:41 +08:00