From: Tyler Hicks Date: Tue, 22 May 2012 20:09:50 +0000 (-0500) Subject: eCryptfs: Unlink lower inode when ecryptfs_create() fails X-Git-Tag: v3.2.32~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04661578e516400ca013a5bba87a2868bfb31610;p=pandora-kernel.git eCryptfs: Unlink lower inode when ecryptfs_create() fails commit 8bc2d3cf612994a960c2e8eaea37f6676f67082a upstream. ecryptfs_create() creates a lower inode, allocates an eCryptfs inode, initializes the eCryptfs inode and cryptographic metadata attached to the inode, and then writes the metadata to the header of the file. If an error was to occur after the lower inode was created, an empty lower file would be left in the lower filesystem. This is a problem because ecryptfs_open() refuses to open any lower files which do not have the appropriate metadata in the file header. This patch properly unlinks the lower inode when an error occurs in the later stages of ecryptfs_create(), reducing the chance that an empty lower file will be left in the lower filesystem. https://launchpad.net/bugs/872905 Signed-off-by: Tyler Hicks Cc: John Johansen Cc: Colin Ian King Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed