Skip to content

Commit d76af0d

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: don't call fscrypt_get_encryption_info() explicitly in f2fs_tmpfile()
In f2fs_tmpfile(), parent inode's encryption info is only used when inheriting encryption context to its child inode, however, we have already called fscrypt_get_encryption_info() in fscrypt_inherit_context() to get the encryption info, so just removing unneeded one in f2fs_tmpfile(). Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 7bcd0cf commit d76af0d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

fs/f2fs/namei.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -874,12 +874,6 @@ static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
874874
if (!f2fs_is_checkpoint_ready(sbi))
875875
return -ENOSPC;
876876

877-
if (IS_ENCRYPTED(dir) || DUMMY_ENCRYPTION_ENABLED(sbi)) {
878-
int err = fscrypt_get_encryption_info(dir);
879-
if (err)
880-
return err;
881-
}
882-
883877
return __f2fs_tmpfile(dir, dentry, mode, NULL);
884878
}
885879

0 commit comments

Comments
 (0)