Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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, 32001d6) 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 32001d6, 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 <[email protected]> Reported-by: Artemy Tregubenko <[email protected]> Tested-by: Artemy Tregubenko <[email protected]> Tested-by: Colin Ian King <[email protected]>
- Loading branch information