Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp418008pxb; Thu, 21 Apr 2022 02:32:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE4wSHkzXYKcYdVM5pPOKH49cpihVxenVEtGElLT1uOj51IvR5OA8UBHl/wMUzG/p1qIIB X-Received: by 2002:a17:906:6a11:b0:6e8:d248:f8ea with SMTP id qw17-20020a1709066a1100b006e8d248f8eamr21649863ejc.500.1650533528415; Thu, 21 Apr 2022 02:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650533528; cv=none; d=google.com; s=arc-20160816; b=PrPRm5F3WDoaz/lSbKth/4ShB2by3ti51KEYZlJGlxpSaO5pSnx1Z9o35wyRvR9yxu 2ofB8nWtxvKkb5SKSMOvVq3zS0o0xlRpUidxS0apklu8NqQuP9QVKOBlW9rmBpoAIXeX Xo9HQNRK8bhRh+1+14baFxZk1d+nMQTNVdydmfonTtlc8CsIUXri8EVPQe5yTppeKR1s qu/rmDVkkl/KQ37DCygeEtWXMmc114iRIzsMzTlBQhNhaYnppyACCQvh1mt0ICNak1rG kzsZLwkVNwCdxbF85K3KxUTmtV+uJFAZK+jsp4PpifXFpkl6gnW6iIsaLP3E1fMln1Fn UcYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kqyIPRpEKHi3QFbh2k8vw2KJbGiX1tCP5QuWevqqO4c=; b=kNRmy4c9tSe6z8nujQkZHJODWZYEbGuJR5o0383xhNu0RE6hT1hKK1KrVVSpCWEWih hintTMZ6pZYJqyoQrj80YHqoNfuC0KirgC0RSnRuDkObgQnBXZTB7sZQcRVq2F+u/Jq3 z4ObYHwZq7TV+QJdPhnkXIuQM/oT4BY49TOdX6BE9n9KvEmEhdQ+y7T6dRC1UuF1QYi+ U39UjsrzohLydQwtkNghTxP45no0Jh2XZwHVpbjXiplA/85WX2QJVK+onwPk7LnFBdaT NFpjSzXUvI0ocBOh0EdHJlAxmDgl/Zu/HXc/wL0rxo0VnnFafpkjUmUseSut/YO17pkk aU+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="J0neBI/t"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w21-20020a17090633d500b006e8634df8b9si3465291eja.728.2022.04.21.02.31.36; Thu, 21 Apr 2022 02:32:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="J0neBI/t"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242680AbiDUF0p (ORCPT + 99 others); Thu, 21 Apr 2022 01:26:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233065AbiDUF0p (ORCPT ); Thu, 21 Apr 2022 01:26:45 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1434DFAF; Wed, 20 Apr 2022 22:23:56 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id iq10so192464pjb.0; Wed, 20 Apr 2022 22:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kqyIPRpEKHi3QFbh2k8vw2KJbGiX1tCP5QuWevqqO4c=; b=J0neBI/t2C848zvRKU4xgW7MW/VFnC1S1H5xglcX5U5iZRhV+I/sqt28r7Z8stJLDf JFOzBlyvXHzTPfwMyu0LcKwYgLLClLpwXBIYQiVY/TsymAtGAMeBWwQ330SPwAjc6onl 1BTpOXN4Phzr33WoJFjYuZG4sKqhBoieCBOhQeUeCiBKSC0FNGaCqwp+y40VCJnYBAGl YEJpGSEcxiA7YCvdJTlUI1aKQrYlgL2UnpKhK5NFYGSmHeVoptmIDW3ipUR8QxwtV/u+ d5BPE3Go5PCJ/HJbYuBOv/xCm4cghS9qmyEs7bRL7qEVlGlrHmTCpXyNmmhWAkoBPnrN hj5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kqyIPRpEKHi3QFbh2k8vw2KJbGiX1tCP5QuWevqqO4c=; b=scBFqn9+nfI22CxPe6O7S7DNZ8T3AUabiJaXgCKOttIKTgqkeAa8loONPjDoh9X+4H zT7KGOy6VbpRJkTPVmM3/gh0dmpr5dVcVWD8RDPZ6XWIwg8Ss5qWrR3TEQXhF+jH/2Ow rOWh4idvr5a+nQ2GANERGvuHGcAN54Na4oKKIRCflzkt5sp2NiARhoNVMtaN83RZRXhN xMH8mnXvMemR47HJR0nweP+7nqR9LXbshYXSC5YGPMwGHVu3FzQg6m5PLaHk4kW2LeD5 J1K0IioozQkvPB/pXEvvhKQHTqJVrmZExaVsfsbF8uzHeU99QBIMcF/BZa4w6CijBDkO VslA== X-Gm-Message-State: AOAM530rh4T2IlAJCl3OPnqgDMds5lI1enfOjD/JEuFMjGw4ZzoEiW2i kWBSrP7HBp5HhQdEVtE/Ir5xoPKwqHY= X-Received: by 2002:a17:90a:f00c:b0:1cb:8361:c78e with SMTP id bt12-20020a17090af00c00b001cb8361c78emr8457233pjb.133.1650518636156; Wed, 20 Apr 2022 22:23:56 -0700 (PDT) Received: from localhost ([2406:7400:63:fca5:5639:1911:2ab6:cfe6]) by smtp.gmail.com with ESMTPSA id s62-20020a635e41000000b003a9eb7f65absm4346225pgb.85.2022.04.20.22.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 22:23:55 -0700 (PDT) From: Ritesh Harjani To: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org Cc: Eric Biggers , Theodore Ts'o , Jan Kara , Ritesh Harjani Subject: [RFC 5/6] ext4: Move all encryption related into a common #ifdef Date: Thu, 21 Apr 2022 10:53:21 +0530 Message-Id: <74855c5d50db92722213a738c0fb43a878dc6557.1650517532.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This just moves left over usages of #ifdef CONFIG_FS_ENCRYPTION into a common place for function/macro definitions. Signed-off-by: Ritesh Harjani --- 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