From patchwork Fri Dec 15 17:42:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 849306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ULXMIe2u"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MgvTV3b8"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yyyZF4zR8z9ryk for ; Sat, 16 Dec 2017 04:47:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=MDpVJcVQaBSZPVW5gK8ADmFEPFU7hkD5y4nlxBijaVw=; b=ULXMIe2uPmaHEoepS2ByFvptd+ KKrkRDOx3zEp14DIU+6e0qPiWLj4qcvLYf+mXfX2I5b6B77HhKebzFhYnpj+HfdXsVBj8gguicO81 sPF2G5kADLb6hOcqgcT9OxfSwwpiu9QMiWPwJKMeOvlQxILPqwms72qcGabBpcO5agz7USeIZw48D Mo53PNFckzgpztSmYn9m3byyvfEIGAPGLEbKKsFb1cfmZBaJKLpx/H5tYXf0V/t7I58LwMV58iyxF jyzAX1cpVnQypXjC4N64gnrCBjbkh9RiK6rpvvuHM4IKMNZaPLZQ531MvB8Lh4gvhKlpNoGyqUm4a hXTO4gmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ePu5G-00009F-0W; Fri, 15 Dec 2017 17:47:42 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ePu4e-0008Nc-A1 for linux-mtd@lists.infradead.org; Fri, 15 Dec 2017 17:47:12 +0000 Received: by mail-pf0-x243.google.com with SMTP id m26so6623209pfj.11 for ; Fri, 15 Dec 2017 09:46:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=THxh3EAtruFT2W2szS9Dcenj0DJhedmxZRGUnwGPIXs=; b=MgvTV3b8IRK/uaB9sW0OC4bT8KkgP+g0lTt6JyhjyHw5VMTGvnWJ/kQlHjY680IrXs 11Y5BWOQks1kAgrf5WOdp8eG0hxJuO+8NNhms2x8T4rYPYTXhOpqjIqKPCHXNPCZpZr0 rdyqpHWt6rgUiPU4qYPax5b2GUKmNJHz04IeTp5cL4kI+Dk8u/Z3JCDJ8TjGv7+5pl7M qfCL7NTV5C5MIytu0BRy7V4hKyUfig0NMUWZpstprNVBelsr8Er4e5zkc6DGHerC4BcG WA6fCcuWJSJ8TwoIuJ6iMCNR9KgXbklyYvPs6xIRpXQDs3yUF0Thl4tOIRRkRt2RvsdO IbZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=THxh3EAtruFT2W2szS9Dcenj0DJhedmxZRGUnwGPIXs=; b=fYSH3RYB1B5OWyumqEDJ4q1Uc1ow2udziR+yLcNY3Mi7lGYhg/ZsE3AlVFwMI1hi5O l2F3JniSFYUn8xPu1Qf+aoosjzl/tD4yPJLxYhbQbz71oDxSDV94jI4L5Uku8r65bGNo PmByJH1xcPAvsI2vZJRF19QwRtEAG17RSeV2reTKXLQj53zlrOk+6Jm+hYIwCa/bPEk9 xuykND5iI3ft3LSwQ2rVwGIJ76sGOChaXcR6aic8Lssj02ca4L1b6+SBX0pIFoPx/t+y c7IkUJpm/E0uFLR0h1tlECvj/OsBisjC+O29CCjkFucaPQ2USjRT6KUn4YgbCnDllP2O UmRw== X-Gm-Message-State: AKGB3mJdWWfvyt56pwD6zkP0MJddtxNA5075qOmbM78HUKA4myCdL9FR F8T4qrGPegfnfEdRcrdfb8I= X-Google-Smtp-Source: ACJfBouCublIqXc6kBYu6GpZ0OEUF/pk4L94UeRJzoP8wF28IlsTVvBNJrU1rDNwvmczn8lp6FGRlg== X-Received: by 10.159.247.14 with SMTP id d14mr14026948pls.274.1513359999152; Fri, 15 Dec 2017 09:46:39 -0800 (PST) Received: from zzz.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id j62sm12980149pfc.18.2017.12.15.09.46.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 09:46:38 -0800 (PST) From: Eric Biggers To: linux-fscrypt@vger.kernel.org Subject: [PATCH 01/24] fscrypt: move fscrypt_has_encryption_key() to supp/notsupp headers Date: Fri, 15 Dec 2017 09:42:02 -0800 Message-Id: <20171215174225.31583-2-ebiggers3@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171215174225.31583-1-ebiggers3@gmail.com> References: <20171215174225.31583-1-ebiggers3@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171215_094704_638378_464C9C6E X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c00:0:0:0:243 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ebiggers3[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (ebiggers3[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Theodore Y . Ts'o" , Eric Biggers , linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, Jaegeuk Kim , linux-ext4@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Eric Biggers fscrypt_has_encryption_key() is already split into two versions depending on whether the filesystem is being built with encryption support or not. Move them into the appropriate headers. Signed-off-by: Eric Biggers --- include/linux/fscrypt.h | 10 ---------- include/linux/fscrypt_notsupp.h | 5 +++++ include/linux/fscrypt_supp.h | 5 +++++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 08b4b40c5aa8..d1c891b5bd9c 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -129,11 +129,6 @@ static inline struct page *fscrypt_control_page(struct page *page) return ((struct fscrypt_ctx *)page_private(page))->w.control_page; } -static inline bool fscrypt_has_encryption_key(const struct inode *inode) -{ - return (inode->i_crypt_info != NULL); -} - #include #else /* !__FS_HAS_ENCRYPTION */ @@ -144,11 +139,6 @@ static inline struct page *fscrypt_control_page(struct page *page) return ERR_PTR(-EINVAL); } -static inline bool fscrypt_has_encryption_key(const struct inode *inode) -{ - return 0; -} - #include #endif /* __FS_HAS_ENCRYPTION */ diff --git a/include/linux/fscrypt_notsupp.h b/include/linux/fscrypt_notsupp.h index 63e58808519a..52e330285457 100644 --- a/include/linux/fscrypt_notsupp.h +++ b/include/linux/fscrypt_notsupp.h @@ -14,6 +14,11 @@ #ifndef _LINUX_FSCRYPT_NOTSUPP_H #define _LINUX_FSCRYPT_NOTSUPP_H +static inline bool fscrypt_has_encryption_key(const struct inode *inode) +{ + return false; +} + /* crypto.c */ static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode, gfp_t gfp_flags) diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index cf9e9fc02f0a..79bb8beae018 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h @@ -11,6 +11,11 @@ #ifndef _LINUX_FSCRYPT_SUPP_H #define _LINUX_FSCRYPT_SUPP_H +static inline bool fscrypt_has_encryption_key(const struct inode *inode) +{ + return (inode->i_crypt_info != NULL); +} + /* crypto.c */ extern struct kmem_cache *fscrypt_info_cachep; extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t);