From patchwork Fri Jan 5 18:44:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10146971 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 9022B604A9 for ; Fri, 5 Jan 2018 18:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D0ED28537 for ; Fri, 5 Jan 2018 18:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71E1F2893A; Fri, 5 Jan 2018 18:58:03 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 1693328537 for ; Fri, 5 Jan 2018 18:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752648AbeAES54 (ORCPT ); Fri, 5 Jan 2018 13:57:56 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:43555 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbeAES51 (ORCPT ); Fri, 5 Jan 2018 13:57:27 -0500 Received: by mail-it0-f68.google.com with SMTP id u62so2626934ita.2; Fri, 05 Jan 2018 10:57:27 -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=O5ZZ0VwsKXiYKYaa56zWIkkGlWuYIYVlUqUVLUxD4wA=; b=ZEm7knD5IT0AetOkJH7MFmFEKe3sReYbgk014ILPA6qOr5BRRk+bJ8yxEdwBrEmuE/ RizY5TR9dDWQiZHpHBjXx/rp77AeOZvx0Tj8IWqkFoxAZjRFl01ENrW48iXGcS+K4/h1 vKGYA+Ue8gnPx0BI3MfTcoj7Antwu5zowN/JRTg/wtUaidUA6Dxnm0fLarbNtSCDI7qh f7h1ibT1P+iW5FQUra1NHaChCY0x/VvZXEBadHAs6iq/uyjp2fo1A22aVt03p+326IL2 i1zdbsmkgIBZDYHdupcXrrUdejPyybe3IXXe5aPZ8pGn7r2njiT7sR+9XWFQKROmyC8z U2AQ== 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=O5ZZ0VwsKXiYKYaa56zWIkkGlWuYIYVlUqUVLUxD4wA=; b=ZmzBLZgAa+H7m+VJL1+U/V0/I6WWacdT7hYildIwFerysc+krISrOXQbuDm0CZnRz9 DJBDh05xTyqfB9hWvUcXXQd9hM3ykMFv1G7CiPhQDGPtYvH7D3zyNX5Pk8auzShS+APk 8b0ju433cDPMrITYjdNuKtuGlN/gv1IXMBC7ClSoKb8NZZkKRyoSMcWxPSJ5TEBB2Pzt 3cCb6DBG7pZ3SKHIA67OslXvpmiU3x/Vpug0VvVNKRUW/rPaziFC1nffeoYrWRd6EFJt zyUNZUALVTkpl76WYuMFgATZGeOfb9mtiQ6f4gLGWx0ov5npCXHhZLTUkQG/Qt1hjmZX OYyg== X-Gm-Message-State: AKGB3mLcXVeSp6H8uQCkzw0BaBxVjq51sZmpixkiqUqvXr1wxfw7wTl9 QISYF4NBnC2JXV27aq5VpPwdrxIz X-Google-Smtp-Source: ACJfBovKi3u4zIV4DzqO0/yHc1eIhOCYtb08uNcGwKOzusc/2MXiLtN4krDJOvxXoge71HSgnhcEkg== X-Received: by 10.36.13.209 with SMTP id 200mr4269772itx.25.1515178646982; Fri, 05 Jan 2018 10:57:26 -0800 (PST) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.66.175.88]) by smtp.gmail.com with ESMTPSA id j68sm3863899iod.53.2018.01.05.10.57.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jan 2018 10:57:26 -0800 (PST) From: Eric Biggers To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, Eric Biggers Subject: [PATCH v2 04/11] fscrypt: move fscrypt_ctx declaration to fscrypt_supp.h Date: Fri, 5 Jan 2018 10:44:55 -0800 Message-Id: <20180105184502.48473-5-ebiggers3@gmail.com> X-Mailer: git-send-email 2.16.0.rc0.223.g4a4ac83678-goog In-Reply-To: <20180105184502.48473-1-ebiggers3@gmail.com> References: <20180105184502.48473-1-ebiggers3@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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);