]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
eCryptfs: Flush file in vma close
authorTyler Hicks <tyhicks@canonical.com>
Mon, 21 Nov 2011 23:31:29 +0000 (17:31 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:52:18 +0000 (08:52 -0800)
commit051726ea7a7d39c03cb5653c962b0b6f47b5cc37
tree66eff6df3e7bfa8a1e0af89f537e9eed304514fe
parentac6766564c0305ca020fe747dfd7dbdf0881369d
eCryptfs: Flush file in vma close

commit 32001d6fe9ac6b0423e674a3093aa56740849f3b upstream.

Dirty pages weren't being written back when an mmap'ed eCryptfs file was
closed before the mapping was unmapped. Since f_ops->flush() is not
called by the munmap() path, the lower file was simply being released.
This patch flushes the eCryptfs file in the vm_ops->close() path.

https://launchpad.net/bugs/870326

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ecryptfs/file.c