lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <20200824061712.195654-4-ebiggers@kernel.org> Date: Sun, 23 Aug 2020 23:17:07 -0700 From: Eric Biggers <ebiggers@...nel.org> To: linux-fscrypt@...r.kernel.org Cc: linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, linux-mtd@...ts.infradead.org, ceph-devel@...r.kernel.org, Jeff Layton <jlayton@...nel.org> Subject: [RFC PATCH 3/8] ext4: remove some #ifdefs in ext4_xattr_credits_for_new_inode() From: Eric Biggers <ebiggers@...gle.com> We don't need #ifdefs for CONFIG_SECURITY and CONFIG_INTEGRITY; IS_ENABLED() is sufficient. Signed-off-by: Eric Biggers <ebiggers@...gle.com> --- fs/ext4/ialloc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 0cc576005a923..3e9c50eb857be 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -763,13 +763,12 @@ static int ext4_xattr_credits_for_new_inode(struct inode *dir, mode_t mode, } #endif -#ifdef CONFIG_SECURITY - { + if (IS_ENABLED(CONFIG_SECURITY)) { int num_security_xattrs = 1; -#ifdef CONFIG_INTEGRITY - num_security_xattrs++; -#endif + if (IS_ENABLED(CONFIG_INTEGRITY)) + num_security_xattrs++; + /* * We assume that security xattrs are never more than 1k. * In practice they are under 128 bytes. @@ -779,7 +778,7 @@ static int ext4_xattr_credits_for_new_inode(struct inode *dir, mode_t mode, NULL /* block_bh */, 1024, true /* is_create */); } -#endif + if (encrypt) nblocks += __ext4_xattr_set_credits(sb, NULL /* inode */, -- 2.28.0
Powered by blists - more mailing lists