1 ext4: get rid of ext4_sb_has_crypto()
3 From: Eric Biggers <ebiggers@google.com>
5 ext4_sb_has_crypto() just called through to ext4_has_feature_encrypt(),
6 and all callers except one were already using the latter. So remove it
7 and switch its one caller to ext4_has_feature_encrypt().
9 Signed-off-by: Eric Biggers <ebiggers@google.com>
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 fs/ext4/ext4.h | 5 -----
13 fs/ext4/ioctl.c | 2 +-
14 2 files changed, 1 insertion(+), 6 deletions(-)
16 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
17 index a8a750f..cc83482 100644
20 @@ -2277,11 +2277,6 @@ extern unsigned ext4_free_clusters_after_init(struct super_block *sb,
21 struct ext4_group_desc *gdp);
22 ext4_fsblk_t ext4_inode_to_goal_block(struct inode *);
24 -static inline int ext4_sb_has_crypto(struct super_block *sb)
26 - return ext4_has_feature_encrypt(sb);
29 static inline bool ext4_encrypted_inode(struct inode *inode)
31 return ext4_test_inode_flag(inode, EXT4_INODE_ENCRYPT);
32 diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
33 index bf5ae8e..a0db5d9 100644
36 @@ -786,7 +786,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
37 struct ext4_sb_info *sbi = EXT4_SB(sb);
40 - if (!ext4_sb_has_crypto(sb))
41 + if (!ext4_has_feature_encrypt(sb))
43 if (uuid_is_zero(sbi->s_es->s_encrypt_pw_salt)) {
44 err = mnt_want_write_file(filp);
46 2.8.0.rc3.226.g39d4020