From patchwork Fri Dec 15 17:42:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10115691 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 947076019C for ; Fri, 15 Dec 2017 17:46:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 826BF29EE1 for ; Fri, 15 Dec 2017 17:46:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7728B2A024; Fri, 15 Dec 2017 17:46:56 +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 287A329EE1 for ; Fri, 15 Dec 2017 17:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756086AbdLORqz (ORCPT ); Fri, 15 Dec 2017 12:46:55 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37419 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755711AbdLORqp (ORCPT ); Fri, 15 Dec 2017 12:46:45 -0500 Received: by mail-pg0-f67.google.com with SMTP id y6so6255058pgp.4; Fri, 15 Dec 2017 09:46:44 -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=dKhzTMza1JvtxVxMhJUKvJ/N5d6wXVijFFBecPYMhjY=; b=qSUA17Lwl8miyOKBkMO8wA5mk7E23n5ZQ75wYKd1vArZa8YTzgGH+u75fUbBme2+wc zm47WhLFDPS6vw4saFTUU1fRHbl5NbHEG0MBI8okVs7QNY4bULBPyMKzzTe+afKwR5xo bCNqlTfZwB6sXcFlVOECmOGbOwmFdhFXsPh3Y/gJ2d95WXsxBXBB7iErlTuYDJIH3XP9 8tS47+qxXh3F8qvTy8LChvObSbTAH5NdMIGkwEypvSU5FzQfTT/Ticw7/rXk9bnr5rBh d1YXsZIWLE8FdmrKyy04upot5KWZebBjUqU2MTXorL3r6LFUT1OfwOHAHSR0Emx3Cyiu S7lw== 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=dKhzTMza1JvtxVxMhJUKvJ/N5d6wXVijFFBecPYMhjY=; b=jJWQxwqMNHFlGuSektJ5A4c0NArVdTzVuGFAZsUrKCmdYMeNdWuFmwXq/kVZyif1So 5hyGKEynni7IjRWfWaHx4LimWJDcDIc3BrvGj8RA600yBxpYfQkSZUriyn5lzA0frvAN ry4unEZ3BlfVIdhwFqWIWusx5oKU2blA1QyKy2mjtCZTHl+5n00qHDeUPkXV+rr3WzZQ CtofwGK+uzR07+vI41xwquJFJ3WQWBtUds9SiCU1K7iTC4mxRfKLAtLKAOGu7vCp2E3R e5mJ54u+NUOVl5dFmTno8C8mELRl7dD5M/aE10EyMG80+CEr7MW7IXPENDJwiso7a+dd RFNg== X-Gm-Message-State: AKGB3mIIS5fTvcm0LqkM0B6g4VvXUT9IyGhAirktcUERTmfTOhoOBUAv vwrsgqpk+cm3cKXvaONXEt0Z19zKYAE= X-Google-Smtp-Source: ACJfBottiea6YX1pW7rnhWs0y6uI5dBhO/x6/agoAcRj90DfGju/Z/diuKAr0ZH7/k6YmwOzsiUOnw== X-Received: by 10.84.217.14 with SMTP id o14mr7313651pli.169.1513360004212; Fri, 15 Dec 2017 09:46:44 -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.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 09:46:43 -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 06/24] fscrypt: move fscrypt_operations declaration to fscrypt_supp.h Date: Fri, 15 Dec 2017 09:42:07 -0800 Message-Id: <20171215174225.31583-7-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 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 {