From patchwork Fri Jan 5 18:45:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10146959 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 C10836166D for ; Fri, 5 Jan 2018 18:57:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD96E28537 for ; Fri, 5 Jan 2018 18:57:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1EE02893E; Fri, 5 Jan 2018 18:57:52 +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=unavailable 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 553F328537 for ; Fri, 5 Jan 2018 18:57:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752405AbeAES5s (ORCPT ); Fri, 5 Jan 2018 13:57:48 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:41299 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbeAES5c (ORCPT ); Fri, 5 Jan 2018 13:57:32 -0500 Received: by mail-it0-f65.google.com with SMTP id x28so2633600ita.0; Fri, 05 Jan 2018 10:57:32 -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=bRfdAdP4SaCrZ6Zxo0PUhJGu7DoswiY8OnjBnnGtzHA=; b=Tbn6WwBfmSP+i20XcCW2LCIIp1stODw6xlsmjPBzlpEUfPFJ7RcPI3CtUZfoY7ry/6 uNwMtPCVr4BoI8xgTKCW/nfrg47yMtgBtzOta+gKimY7jra41LFIQM0iZsNNpoK4gXxf CUNJXibMBP9iCZaaME/KhT6qjHXOvYQAWi5F/V+nwX0igobR69+vQ0u1gyeubX46naa4 MDuxsCv0D9y43zp5tisNk4mXuBsGqckDhlFBOCv0aG+HHvloTwbUiP0t/dSv6rMm5cer +iSvX01/qUl20G831fm/19808UfLsVapTh/ifPFTocPadKhcdLD4mfOxUZYbZL2ii6h4 TW7Q== 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=bRfdAdP4SaCrZ6Zxo0PUhJGu7DoswiY8OnjBnnGtzHA=; b=aMEIkdr/AC0uVPjmSf/4BVLy6hlYdIKGvlUrv9EHdUpv+A3YO92NinUxLwFsw5P8Sg 8VMoTN2c5ysW0Jg8JcE6X1RjSX5ShrLgf358zw9r4lmD+UQjTelNxlruxLoVnmp+OAc/ qLl4hRZIdyLv9b99Iw5+TFEvPkhO1ilep7n7Gcjg3XTrgO65kjAftNfmCNfM+ZWfcm5s VcHJiGxIj/l2eBQYuT/Wpbf+KNqkFQEMH5DlwS5B9jmuVlySFVS0tl5cJBwcJlOz2Eca NzuWziUYsXyNTpmTZdFU4Ii1rDRLzsOi+XeEJtxNgo1LQULJw9iImzJXiH1lPuR42lxc Oldg== X-Gm-Message-State: AKGB3mKtNcbgAdRa6+l1cYgwN+EaIrYlKzPz/NOd9Jh/HybZsYbi06qJ 4tS58/SJDGvDlj81eV4GZErTB0FY X-Google-Smtp-Source: ACJfBovSNxzYnsNuTzsIVJiYNHPYt1OFW8JKLYnph/GXqeqSIgkkN8hazRv0KD7fQrH4CB79ONTGcg== X-Received: by 10.36.114.193 with SMTP id x184mr3970288itc.71.1515178651647; Fri, 05 Jan 2018 10:57:31 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jan 2018 10:57:31 -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 09/11] fscrypt: trim down fscrypt.h includes Date: Fri, 5 Jan 2018 10:45:00 -0800 Message-Id: <20180105184502.48473-10-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-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 fscrypt.h included way too many other headers, given that it is included by filesystems both with and without encryption support. Trim down the includes list by moving the needed includes into more appropriate places, and removing the unneeded ones. Signed-off-by: Eric Biggers --- fs/crypto/crypto.c | 1 + fs/crypto/fname.c | 1 + fs/crypto/keyinfo.c | 1 + include/linux/fscrypt.h | 6 ------ include/linux/fscrypt_supp.h | 3 +++ 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c index 732a786cce9d..ce654526c0fb 100644 --- a/fs/crypto/crypto.c +++ b/fs/crypto/crypto.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "fscrypt_private.h" static unsigned int num_prealloc_crypto_pages = 32; diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c index b8c5061553b1..52d4dbe1e8e7 100644 --- a/fs/crypto/fname.c +++ b/fs/crypto/fname.c @@ -13,6 +13,7 @@ #include #include +#include #include "fscrypt_private.h" static inline bool fscrypt_is_dot_dotdot(const struct qstr *str) diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c index 5e6e846f5a24..c115eac4b4cf 100644 --- a/fs/crypto/keyinfo.c +++ b/fs/crypto/keyinfo.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "fscrypt_private.h" static struct crypto_shash *essiv_hash_tfm; diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 3045fc49d3ca..071ebabfc287 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -14,13 +14,7 @@ #ifndef _LINUX_FSCRYPT_H #define _LINUX_FSCRYPT_H -#include #include -#include -#include -#include -#include -#include #define FS_CRYPTO_BLOCK_SIZE 16 diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index ce61caf26f40..562a9bc04560 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h @@ -11,6 +11,9 @@ #ifndef _LINUX_FSCRYPT_SUPP_H #define _LINUX_FSCRYPT_SUPP_H +#include +#include + /* * fscrypt superblock flags */