[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <74855c5d50db92722213a738c0fb43a878dc6557.1650517532.git.ritesh.list@gmail.com>
Date: Thu, 21 Apr 2022 10:53:21 +0530
From: Ritesh Harjani <ritesh.list@...il.com>
To: linux-fscrypt@...r.kernel.org, linux-ext4@...r.kernel.org
Cc: Eric Biggers <ebiggers@...nel.org>, Theodore Ts'o <tytso@....edu>,
Jan Kara <jack@...e.cz>, Ritesh Harjani <ritesh.list@...il.com>
Subject: [RFC 5/6] ext4: Move all encryption related into a common #ifdef
This just moves left over usages of #ifdef CONFIG_FS_ENCRYPTION
into a common place for function/macro definitions.
Signed-off-by: Ritesh Harjani <ritesh.list@...il.com>
---
fs/ext4/ext4.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index caf154db4680..2fb69c500063 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1440,12 +1440,6 @@ struct ext4_super_block {
#ifdef __KERNEL__
-#ifdef CONFIG_FS_ENCRYPTION
-#define DUMMY_ENCRYPTION_ENABLED(sbi) ((sbi)->s_dummy_enc_policy.policy != NULL)
-#else
-#define DUMMY_ENCRYPTION_ENABLED(sbi) (0)
-#endif
-
/* Number of quota types we support */
#define EXT4_MAXQUOTAS 3
@@ -2740,6 +2734,8 @@ int ext4_fname_prepare_lookup(struct inode *dir, struct dentry *dentry,
void ext4_fname_free_filename(struct ext4_filename *fname);
+#define DUMMY_ENCRYPTION_ENABLED(sbi) ((sbi)->s_dummy_enc_policy.policy != NULL)
+
#else /* !CONFIG_FS_ENCRYPTION */
static inline int ext4_fname_setup_filename(struct inode *dir,
const struct qstr *iname,
@@ -2772,6 +2768,8 @@ static inline void ext4_fname_free_filename(struct ext4_filename *fname)
fname->cf_name.name = NULL;
#endif
}
+
+#define DUMMY_ENCRYPTION_ENABLED(sbi) (0)
#endif /* !CONFIG_FS_ENCRYPTION */
/* dir.c */
--
2.31.1
Powered by blists - more mailing lists