Skip to content

Commit

Permalink
f2fs: don't call fscrypt_get_encryption_info() explicitly in f2fs_tmp…
Browse files Browse the repository at this point in the history
…file()

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]>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Mar 31, 2020
1 parent 7bcd0cf commit d76af0d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/f2fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,12 +874,6 @@ static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
if (!f2fs_is_checkpoint_ready(sbi))
return -ENOSPC;

if (IS_ENCRYPTED(dir) || DUMMY_ENCRYPTION_ENABLED(sbi)) {
int err = fscrypt_get_encryption_info(dir);
if (err)
return err;
}

return __f2fs_tmpfile(dir, dentry, mode, NULL);
}

Expand Down

0 comments on commit d76af0d

Please sign in to comment.