From patchwork Fri Dec 15 17:42:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10115683 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 BA71C6019C for ; Fri, 15 Dec 2017 17:46:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A886F29F27 for ; Fri, 15 Dec 2017 17:46:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D62F2A092; Fri, 15 Dec 2017 17:46:51 +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 2C6B429F27 for ; Fri, 15 Dec 2017 17:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756061AbdLORqu (ORCPT ); Fri, 15 Dec 2017 12:46:50 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:46641 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755996AbdLORqs (ORCPT ); Fri, 15 Dec 2017 12:46:48 -0500 Received: by mail-pg0-f65.google.com with SMTP id b11so6241847pgu.13; Fri, 15 Dec 2017 09:46:48 -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=r4VMNJDizwFuv9//VeEGEKoZ8Qy8LHfUs6A45wtsxS8=; b=JxY3RQWFr/emuqz6vQRzPSOxb1Ft+WjEt56gUicYwFRsd0KwUAzCTfw56fPGo5pD/n yWiWDL6+iA2wyUpEtJVAc5fxMWBN0gSFck5ZZg8XCTX4VlMxBpfWPSfLw2QL76veLNq0 wFlWPTOl+InUe5IZ0N1eCzzFVk/Nu4tyTmFETUhlX+lm/dLrZnkUbZ7joQLinvfj6hIt W4sZWx9PuznUnReLF1ZrS1sQInAwAKqTlL/bYJl7n5gd+aS00FoSdKqaS4j6duZ+Wmc0 nnSlJhL0IIJxZQrkrPHU0D2bS5Na/PSKXQls2RKR8uVswnRZMfxAgUvovsRj6vlVT97V QdfA== 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=r4VMNJDizwFuv9//VeEGEKoZ8Qy8LHfUs6A45wtsxS8=; b=txoVX2EWDIOUzmVpyf4q+ZvMJoj9dgq2ZbjfP3jTb+YkgnkdkhXxUz/F2TpCdgKAta hVeIhzVy32RoGQjPXpfi8E15B8l3ZqaecaiZBON+spThoSuiY9QIC8OVlClhZ3a7B+7w z5ZNWw6u4d0Utd7t2vDoEnhCr4KZLHPCDPms/sRD4SwJJK6Lgu2adB1kdabNa/dKfwlt gGsBNpsketCsBMvko8mnwxg8OzJIpJoU6xDVUuIxJULxgebQdX3lIbDSL6xnojnQwD1d evPuscJTobjcekCWYMYLUFidripbOuqWy+TyTXzAFNTWGsCsA5Hzp/Gv1UxMM2Kh0VX4 pz4g== X-Gm-Message-State: AKGB3mJCNnPLqcmOK6zLldouCdZ/0O1CfazRcWdpDTc8UkQgy2dlUpg8 0nCbsqLjqG0rGM7JsEZMk8AKBGPkFtg= X-Google-Smtp-Source: ACJfBosSlMm2NPdJdprBNiWpYk31uJwwMfBslAV5VpN+tZDju+FugPcOxLDHB+1zuPFRcniIxMNadA== X-Received: by 10.98.98.5 with SMTP id w5mr14193391pfb.147.1513360007613; Fri, 15 Dec 2017 09:46:47 -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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 09:46:47 -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 09/24] fscrypt: trim down fscrypt.h includes Date: Fri, 15 Dec 2017 09:42:10 -0800 Message-Id: <20171215174225.31583-10-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 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 */