From: Jaegeuk Kim Date: Tue, 19 May 2015 23:11:40 +0000 (-0700) Subject: f2fs crypto: check encryption for tmpfile X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=304eecc3462ed62006433d04e3ad945f92f90d52;p=linux-beck.git f2fs crypto: check encryption for tmpfile This patch adds to check encryption for tmpfile in early stage. Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 6edad57d7b47..a316783de8c9 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -569,6 +569,12 @@ out: static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) { + if (f2fs_encrypted_inode(dir)) { + int err = f2fs_get_encryption_info(dir); + if (err) + return err; + } + return __f2fs_tmpfile(dir, dentry, mode, NULL); }