From patchwork Fri Jan 5 18:44:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10146941 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 AF2DF612E6 for ; Fri, 5 Jan 2018 18:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B96C28537 for ; Fri, 5 Jan 2018 18:57:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 902612893A; Fri, 5 Jan 2018 18:57:34 +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 380DF28537 for ; Fri, 5 Jan 2018 18:57:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570AbeAES5d (ORCPT ); Fri, 5 Jan 2018 13:57:33 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:37918 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752475AbeAES53 (ORCPT ); Fri, 5 Jan 2018 13:57:29 -0500 Received: by mail-it0-f67.google.com with SMTP id r6so2708419itr.3; Fri, 05 Jan 2018 10:57:29 -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=ENh/jnMnY+EdmMBL7OdcKfq2LzYPRySibo84B3ndiPk=; b=ktEfpNjMGGDPlNjSQ2lNa1l9IddOyRLlcuiDkDofkgFQ5mXrk8C0yQJz9Ax6UQHIk/ 0IQSF/V5iyH8YhhZkss0vzD1xFWQwlyAcc6zLPLeuxzS+r9IVoPoqT2opuE/1s+gSnBb iSir7tYb60/4Tipyk3dIejVORmFEMWrBd2+Jex5neVX9KU8RTp4VdJ1glw9g1vVadlJE ZSktT1PzaXdcJF9MyzE9k5dBpNmzuAE5ZA6fMQoCHQ+0bgGJH0s9IDgE8dyYtSD6qGEs nJorqzg9z+rXoTEvhV8bktgj+5piObG8GinaijyDtzUAHPlNZDLJ8tW/rQfPSyLEFlE4 NcdQ== 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=ENh/jnMnY+EdmMBL7OdcKfq2LzYPRySibo84B3ndiPk=; b=N635l3bpf21J5x8bytJ8ewdw0P7shFdNHQxQN2jV06/O+PLEYwM+jy7fiS++9JPvaJ RWgnKEYC6CkJd7G5Bhy4OMXDNBTDJdg47suMOq0d4VKfVghb+5kVw06zkuPVIjFiJNK9 56m18nN37yxfDqL9OVqJ9jW+p6gsKcT4WjXXiWX31zfm14+4rKDmnAfnlBxj7W4FyJsM qvyAKBQ3F8oVvnAN9XuLneVgMrgagbGFceQIErhp1gPQ1szpWr+wPuxu25tbQDLQB5XG dUgAc+faAiUSCJ4uc/4Fm6W55KZG5WZ4G7vsqHkYRSXfNwOlCqBDqf/rb9MUoxC8EAZS IZRA== X-Gm-Message-State: AKGB3mIwM2CQ5OZYsqNhw8pRo4zpsbefSeQk3mdwjVFE1yI7Ncd78nDN hOaoJvqeeK6wj+tLLgeWV7OHxXto X-Google-Smtp-Source: ACJfBovi3jboeRoKfQEdMznSUMMaqHN2BaKTeNMwf0M7EdlQEgjnJozhqSN9iskCNoD8yLZUIN4Ryg== X-Received: by 10.36.200.2 with SMTP id w2mr4051310itf.17.1515178648892; Fri, 05 Jan 2018 10:57:28 -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.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jan 2018 10:57:28 -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 06/11] fscrypt: move fscrypt_operations declaration to fscrypt_supp.h Date: Fri, 5 Jan 2018 10:44:57 -0800 Message-Id: <20180105184502.48473-7-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 Filesystems now only define their fscrypt_operations when they are compiled with encryption support, so move the fscrypt_operations declaration from fscrypt.h to fscrypt_supp.h. Signed-off-by: Eric Biggers --- include/linux/fscrypt.h | 18 ------------------ include/linux/fscrypt_supp.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index b671a4eef47f..33b95a91f720 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -54,24 +54,6 @@ struct fscrypt_name { #define fname_name(p) ((p)->disk_name.name) #define fname_len(p) ((p)->disk_name.len) -/* - * fscrypt superblock flags - */ -#define FS_CFLG_OWN_PAGES (1U << 1) - -/* - * crypto opertions for filesystems - */ -struct fscrypt_operations { - unsigned int flags; - const char *key_prefix; - int (*get_context)(struct inode *, void *, size_t); - int (*set_context)(struct inode *, const void *, size_t, void *); - bool (*dummy_context)(struct inode *); - bool (*empty_dir)(struct inode *); - unsigned (*max_namelen)(struct inode *); -}; - /* Maximum value for the third parameter of fscrypt_operations.set_context(). */ #define FSCRYPT_SET_CONTEXT_MAX_SIZE 28 diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index e7dfa2974906..ce61caf26f40 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h @@ -11,6 +11,24 @@ #ifndef _LINUX_FSCRYPT_SUPP_H #define _LINUX_FSCRYPT_SUPP_H +/* + * fscrypt superblock flags + */ +#define FS_CFLG_OWN_PAGES (1U << 1) + +/* + * crypto operations for filesystems + */ +struct fscrypt_operations { + unsigned int flags; + const char *key_prefix; + int (*get_context)(struct inode *, void *, size_t); + int (*set_context)(struct inode *, const void *, size_t, void *); + bool (*dummy_context)(struct inode *); + bool (*empty_dir)(struct inode *); + unsigned (*max_namelen)(struct inode *); +}; + struct fscrypt_ctx { union { struct {