]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
eCryptfs: Call lower ->flush() from ecryptfs_flush()
authorTyler Hicks <tyhicks@canonical.com>
Thu, 13 Sep 2012 01:38:00 +0000 (18:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:28:01 +0000 (09:28 -0700)
commita5b9aa5533324fc9e3c2abe24ef335245473c331
tree756d6bdab6d892d668494515873fa4d51b6d3d72
parente7ba1a13e4c4d315d94afb45e6dfaa7c543d9ba2
eCryptfs: Call lower ->flush() from ecryptfs_flush()

commit 64e6651dcc10e9d2cc6230208a8e6c2cfd19ae18 upstream.

Since eCryptfs only calls fput() on the lower file in
ecryptfs_release(), eCryptfs should call the lower filesystem's
->flush() from ecryptfs_flush().

If the lower filesystem implements ->flush(), then eCryptfs should try
to flush out any dirty pages prior to calling the lower ->flush(). If
the lower filesystem does not implement ->flush(), then eCryptfs has no
need to do anything in ecryptfs_flush() since dirty pages are now
written out to the lower filesystem in ecryptfs_release().

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