From patchwork Fri Dec 15 17:42:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10115681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 084FE6019C for ; Fri, 15 Dec 2017 17:46:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAA6029EE1 for ; Fri, 15 Dec 2017 17:46:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF9112A024; Fri, 15 Dec 2017 17:46:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82D6429EE1 for ; Fri, 15 Dec 2017 17:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755976AbdLORqp (ORCPT ); Fri, 15 Dec 2017 12:46:45 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:32923 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755851AbdLORqn (ORCPT ); Fri, 15 Dec 2017 12:46:43 -0500 Received: by mail-pg0-f67.google.com with SMTP id g7so6264107pgs.0; Fri, 15 Dec 2017 09:46:42 -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=fAHfa10qNBCwX0NeoZZJPxvg4jSBdjGK9SOdb+nl4+k=; b=YUJQ88YGFDLyKSjOPNkck+RaSnWFJWtosFXvwRmlJ2X9gPSz9s3rtrsqy+fvKLnF0h 0eryVDu3XcE7tXgl6Ls+NSy5Gw//S3Dz83DYnQvT3bH27zwjanNqOffPDZ3Ixp3sVBi2 QldYLlWjhez3m5b4qbB/2diuCJlG2EO6yYndXPpA12nq8BB/78YblN8TTer2Kha6lCXH DVvUJbAR47nEl0RGSqJywcs5IcJpmF1INvAshz18Ozo010OTFcoRFDbJt8HDq2NAJt9D ZQs8N8ygsGOM1aFeSz9peNOr1rBwuTjxuFoIDx/rA/RCr9uezjfmWRWq7MJe2Ot+ru0T 8RrA== 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=fAHfa10qNBCwX0NeoZZJPxvg4jSBdjGK9SOdb+nl4+k=; b=BAdb0Q7Kqv6L0SZneCRpUlBTYQ/O5Zzt3mTqFmH+n9YWTzgSikpmWpGia4eppR/NzG 0EpfqXFm7+BFOKj2n7FyWiceqRU8nXDMzBaJmdU6q2moZD3gOTst78iQ1Yc0gF3MhZ+g UimRYyqPZzpBLV3kbiZsv/yVhK1S3IVCLjQNnNqhUeHPkcAd+h75XhnytRWe4eDONlpP 2+/g1AFzch1tRO/u+DHuO4yYccQ3hfG09gA5sR1IyYNYLxWoEa59KKRE5QMQLazbEBtk bzt+7PKwBRz20yC4PcOAP2kBe/BQdDpMbHqw+Bp3rGXUhaCFMaK6MvdHSGs17IydfW9r r2xg== X-Gm-Message-State: AKGB3mJybqAoorsyX+21nxNIj1J3WKCvgWDui1Ge1z089qjFhQRMum15 kLeCko3nZ/NxJEZEPsAzesk0gcTk5XY= X-Google-Smtp-Source: ACJfBosmGfZDMqyF8oI+p8hiRfpVcA/LLOZbQr8IvKmg1RiYRdd1WfPWOwmE8cgkKhELLkLWTpDgvw== X-Received: by 10.159.255.7 with SMTP id bi7mr13965167plb.221.1513360002084; Fri, 15 Dec 2017 09:46:42 -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.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 09:46:41 -0800 (PST) From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: "Theodore Y . Ts'o" , Jaegeuk Kim , linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, Eric Biggers Subject: [PATCH 04/24] fscrypt: move fscrypt_ctx declaration to fscrypt_supp.h Date: Fri, 15 Dec 2017 09:42:05 -0800 Message-Id: <20171215174225.31583-5-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> Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers Filesystems only ever access 'struct fscrypt_ctx' through fscrypt functions. But when a filesystem is built without encryption support, these functions are all stubbed out, so the declaration of fscrypt_ctx is unneeded. Therefore, move it from fscrypt.h to fscrypt_supp.h. Signed-off-by: Eric Biggers --- include/linux/fscrypt.h | 16 +--------------- include/linux/fscrypt_supp.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index c23b2f16129a..0f94d087a6d1 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -24,23 +24,9 @@ #define FS_CRYPTO_BLOCK_SIZE 16 +struct fscrypt_ctx; struct fscrypt_info; -struct fscrypt_ctx { - union { - struct { - struct page *bounce_page; /* Ciphertext page */ - struct page *control_page; /* Original page */ - } w; - struct { - struct bio *bio; - struct work_struct work; - } r; - struct list_head free_list; /* Free list */ - }; - u8 flags; /* Flags */ -}; - /** * For encrypted symlinks, the ciphertext length is stored at the beginning * of the string in little-endian format. diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index 33d641e27c18..fd6ee089ced0 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h @@ -11,6 +11,21 @@ #ifndef _LINUX_FSCRYPT_SUPP_H #define _LINUX_FSCRYPT_SUPP_H +struct fscrypt_ctx { + union { + struct { + struct page *bounce_page; /* Ciphertext page */ + struct page *control_page; /* Original page */ + } w; + struct { + struct bio *bio; + struct work_struct work; + } r; + struct list_head free_list; /* Free list */ + }; + u8 flags; /* Flags */ +}; + static inline bool fscrypt_has_encryption_key(const struct inode *inode) { return (inode->i_crypt_info != NULL);