From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65619C43466 for ; Mon, 24 Aug 2020 06:35:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E6A721741 for ; Mon, 24 Aug 2020 06:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598249911; bh=IH6sTOwkbzPMf4x5Li5gjFgkfm2HNIgk1xMl8TNxDTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=M0QlSJXyvlYqznzTG2Y2BhxCM6AQBe3R0YCG+UioM9Xcp5/nyDdDx4ac42TFGCnNb xmPzY3+z+AblWzkCNUD4D+1hm1eeTeiHcTW0LTFBXx6OGwZrVZDptTI778cAzOsp4+ vjO68Duhb0e/mBoC5bFDJHPVVj154hFnH/9B29DU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726218AbgHXGSa (ORCPT ); Mon, 24 Aug 2020 02:18:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:49754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbgHXGST (ORCPT ); Mon, 24 Aug 2020 02:18:19 -0400 Received: from sol.hsd1.ca.comcast.net (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E15422087D; Mon, 24 Aug 2020 06:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598249899; bh=IH6sTOwkbzPMf4x5Li5gjFgkfm2HNIgk1xMl8TNxDTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JDKODAQpPTq5huUKShVPhJTG2Df1AHur6QPxO7Njy/ZJwbOEtmt/3AwrwdxS7/TVN ZMC92UTKIOeYa+JwpYJPxIO128wY9hOL8oTYduzs1O3YrW9UDLUMuf7TCoC739bDtJ CfMQrNc+4ZGVgY9GdtXke3sxODPPYPwCrcKZmOoM= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, ceph-devel@vger.kernel.org, Jeff Layton Subject: [RFC PATCH 3/8] ext4: remove some #ifdefs in ext4_xattr_credits_for_new_inode() Date: Sun, 23 Aug 2020 23:17:07 -0700 Message-Id: <20200824061712.195654-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824061712.195654-1-ebiggers@kernel.org> References: <20200824061712.195654-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org From: Eric Biggers We don't need #ifdefs for CONFIG_SECURITY and CONFIG_INTEGRITY; IS_ENABLED() is sufficient. Signed-off-by: Eric Biggers --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70150C43470 for ; Mon, 24 Aug 2020 06:35:27 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 423D322B43; Mon, 24 Aug 2020 06:18:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="YqKtMUb7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="P6ArYrol"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="JDKODAQp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 423D322B43 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kA5oR-0002Ce-U4; Mon, 24 Aug 2020 06:18:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kA5oP-0002Bv-9Z for linux-f2fs-devel@lists.sourceforge.net; Mon, 24 Aug 2020 06:18:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MP8qlXNuL1EiYOJAiD5rlAIIVRNLl5s58ky8k1GHPlY=; b=YqKtMUb76rC/VEe53McnTpBtnw r/3cudeFAPje+kjRLRKxi157Qfn/4HKD9ln0VY3m8WNU9wbJ6wIebIOt7HA2w9lESz4piAMxt9n0L oMLhmcIlmNMXcK3WrNg1fZQ8eMG6QEW81uj8yfQMM/ctiLmlkPdtzpwHrH1FhQKrgxlo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MP8qlXNuL1EiYOJAiD5rlAIIVRNLl5s58ky8k1GHPlY=; b=P6ArYrolP3p8fEpj4Ls822GhH5 rN7Z1VlAJZd389/OAQj7tBAdOv989kozNSuJkopPFg2DqejtqP3lkgJLzEu4aDk5I5RukKKEyJsqS +wsmqHlMFMf2tP07AUwhaDemFpHK5Am/0GnZbGah4G/Y8dAqLaLb9DOQZhPgYfUi0iJw=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kA5oN-002Evf-Jd for linux-f2fs-devel@lists.sourceforge.net; Mon, 24 Aug 2020 06:18:33 +0000 Received: from sol.hsd1.ca.comcast.net (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E15422087D; Mon, 24 Aug 2020 06:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598249899; bh=IH6sTOwkbzPMf4x5Li5gjFgkfm2HNIgk1xMl8TNxDTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JDKODAQpPTq5huUKShVPhJTG2Df1AHur6QPxO7Njy/ZJwbOEtmt/3AwrwdxS7/TVN ZMC92UTKIOeYa+JwpYJPxIO128wY9hOL8oTYduzs1O3YrW9UDLUMuf7TCoC739bDtJ CfMQrNc+4ZGVgY9GdtXke3sxODPPYPwCrcKZmOoM= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Date: Sun, 23 Aug 2020 23:17:07 -0700 Message-Id: <20200824061712.195654-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824061712.195654-1-ebiggers@kernel.org> References: <20200824061712.195654-1-ebiggers@kernel.org> MIME-Version: 1.0 X-Headers-End: 1kA5oN-002Evf-Jd Subject: [f2fs-dev] [RFC PATCH 3/8] ext4: remove some #ifdefs in ext4_xattr_credits_for_new_inode() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Layton , ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Eric Biggers We don't need #ifdefs for CONFIG_SECURITY and CONFIG_INTEGRITY; IS_ENABLED() is sufficient. Signed-off-by: Eric Biggers --- 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 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 668BEC43467 for ; Mon, 24 Aug 2020 06:35:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2CF822D01 for ; Mon, 24 Aug 2020 06:19:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FszKScN0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="JDKODAQp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2CF822D01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7xHZEr0QDat55/YWkbBmjOV9A39fsVQdExYPqOTFdkQ=; b=FszKScN0nOa/0nOkYBQaPGNIm gCRFNCStkgGRZGEAsjmwtLLKLgi4cIXJUnBm4NlgP74tO2i2ZaBmrfJpUNnxjqrW7+oa/1pSfVHoN Jan664W4Jr6VdQQIai1nB/tJbhqVoxUXqtOrWGNiFseS9W5IIL03T0DzKi0zFQZ7BcN6W29KM7iiZ hPGSKJNxviJjcFziqjlooLtZ06zwMfOG4nkMmA1Ds/+IiGnTVwXuy3BJOS08pOTQW+y2KlHr4fmVu XlfH8OmlpCrQC4jiExJ6lVU0jUejrL+Su+8M7zSdW8PGd8HxbLtsfX5KRFjtaRCMNXQGrCzUt781o gvKcAGY9w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kA5oI-0003kZ-A9; Mon, 24 Aug 2020 06:18:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kA5oC-0003hk-OY for linux-mtd@lists.infradead.org; Mon, 24 Aug 2020 06:18:23 +0000 Received: from sol.hsd1.ca.comcast.net (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E15422087D; Mon, 24 Aug 2020 06:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598249899; bh=IH6sTOwkbzPMf4x5Li5gjFgkfm2HNIgk1xMl8TNxDTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JDKODAQpPTq5huUKShVPhJTG2Df1AHur6QPxO7Njy/ZJwbOEtmt/3AwrwdxS7/TVN ZMC92UTKIOeYa+JwpYJPxIO128wY9hOL8oTYduzs1O3YrW9UDLUMuf7TCoC739bDtJ CfMQrNc+4ZGVgY9GdtXke3sxODPPYPwCrcKZmOoM= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Subject: [RFC PATCH 3/8] ext4: remove some #ifdefs in ext4_xattr_credits_for_new_inode() Date: Sun, 23 Aug 2020 23:17:07 -0700 Message-Id: <20200824061712.195654-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824061712.195654-1-ebiggers@kernel.org> References: <20200824061712.195654-1-ebiggers@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200824_021820_940419_FB8D4CAD X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Layton , ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org From: Eric Biggers We don't need #ifdefs for CONFIG_SECURITY and CONFIG_INTEGRITY; IS_ENABLED() is sufficient. Signed-off-by: Eric Biggers --- 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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/