summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/file.c
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@canonical.com>2012-05-22 15:09:50 -0500
committerTyler Hicks <tyhicks@canonical.com>2012-07-08 12:51:44 -0500
commit8bc2d3cf612994a960c2e8eaea37f6676f67082a (patch)
tree88e1eb6d53540891b82d2a861146b213442de205 /fs/ecryptfs/file.c
parent2ecaf55db6dcf4dd25e1ef8d5eb6068e3286a20f (diff)
downloadlinux-8bc2d3cf612994a960c2e8eaea37f6676f67082a.tar.bz2
eCryptfs: Unlink lower inode when ecryptfs_create() fails
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 <tyhicks@canonical.com> Cc: John Johansen <john.johansen@canonical.com> Cc: Colin Ian King <colin.king@canonical.com>
Diffstat (limited to 'fs/ecryptfs/file.c')
0 files changed, 0 insertions, 0 deletions