Skip to content

Commit

Permalink
ext4: get rid of ext4_sb_has_crypto()
Browse files Browse the repository at this point in the history
ext4_sb_has_crypto() just called through to ext4_has_feature_encrypt(),
and all callers except one were already using the latter.  So remove it
and switch its one caller to ext4_has_feature_encrypt().

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Eric Biggers authored and Theodore Ts'o committed Dec 1, 2016
1 parent 05ac5aa commit 35997d1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -2272,11 +2272,6 @@ extern unsigned ext4_free_clusters_after_init(struct super_block *sb,
struct ext4_group_desc *gdp);
ext4_fsblk_t ext4_inode_to_goal_block(struct inode *);

static inline int ext4_sb_has_crypto(struct super_block *sb)
{
return ext4_has_feature_encrypt(sb);
}

static inline bool ext4_encrypted_inode(struct inode *inode)
{
return ext4_test_inode_flag(inode, EXT4_INODE_ENCRYPT);
Expand Down
2 changes: 1 addition & 1 deletion fs/ext4/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
struct ext4_sb_info *sbi = EXT4_SB(sb);
handle_t *handle;

if (!ext4_sb_has_crypto(sb))
if (!ext4_has_feature_encrypt(sb))
return -EOPNOTSUPP;
if (uuid_is_zero(sbi->s_es->s_encrypt_pw_salt)) {
err = mnt_want_write_file(filp);
Expand Down

0 comments on commit 35997d1

Please sign in to comment.