ext4 crypto: encrypt tmpfile located in encryption protected directory
authorTheodore Ts'o <tytso@mit.edu>
Sun, 31 May 2015 17:35:02 +0000 (13:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 31 May 2015 17:35:02 +0000 (13:35 -0400)
commite709e9df64928a99d41da75910b844976a535db7
tree3661c61b6709f910f5ef1d365890c120819ac380
parent6bc445e0ff44c7e83225124c214d350407e68ccf
ext4 crypto: encrypt tmpfile located in encryption protected directory

Factor out calls to ext4_inherit_context() and move them to
__ext4_new_inode(); this fixes a problem where ext4_tmpfile() wasn't
calling calling ext4_inherit_context(), so the temporary file wasn't
getting protected.  Since the blocks for the tmpfile could end up on
disk, they really should be protected if the tmpfile is created within
the context of an encrypted directory.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/namei.c