add patch fix-checks-for-data-ordered-and-journal_async_commit-options
[ext4-patch-queue.git] / get-rid-of-ext4_sb_has_crypto
blob13853b3f345ecc38c08234b66e4af327919a57cb
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>
11 ---
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
18 --- a/fs/ext4/ext4.h
19 +++ b/fs/ext4/ext4.h
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)
30  {
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
34 --- a/fs/ext4/ioctl.c
35 +++ b/fs/ext4/ioctl.c
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);
38                 handle_t *handle;
40 -               if (!ext4_sb_has_crypto(sb))
41 +               if (!ext4_has_feature_encrypt(sb))
42                         return -EOPNOTSUPP;
43                 if (uuid_is_zero(sbi->s_es->s_encrypt_pw_salt)) {
44                         err = mnt_want_write_file(filp);
45 -- 
46 2.8.0.rc3.226.g39d4020