From patchwork Thu Mar 14 17:15:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 1056621 X-Patchwork-Delegate: richard@nod.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xvlpmu8Z"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44KwP33JGDz9s55 for ; Fri, 15 Mar 2019 04:16:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+Mmd45AU0+F2RjPsD2lo2FFKgf7Qsdxy7FW/m5yo6Ek=; b=Xvlpmu8ZcBrdau KvkgSYmQ+5zeMkugBgiuBGL7/FtBmMHzDqXIrPMazlyxt/GGgY7nXwPB6vfU9EkXSCEN/UNm+6pIf V9KzpoxlN+uogKJ9awEivL49KinmU3BX1NbcA92/HJgp7yNM8urt7/V8FKPBB4e3NybMnaCusx79p TD2s/JKFKknaib/gmhA9UmDqIfAmFyoynABQkZI5M8QTEKw+XrZAHokx90/2x7D2G6BL8aaJmGnQk Ba6viMeGXCi4MNtSAfhBdDeivQLMQ0Lw1nntabNMOCPA5tuBO3h0+C9NSwqvMTi76RQp6AA2mHx5G J2hX25aoY4rMKHnaui8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4TyF-00018i-A6; Thu, 14 Mar 2019 17:16:43 +0000 Received: from lilium.sigma-star.at ([109.75.188.150]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4Ty7-00015n-2k for linux-mtd@lists.infradead.org; Thu, 14 Mar 2019 17:16:38 +0000 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id 175C21802DF74; Thu, 14 Mar 2019 18:16:16 +0100 (CET) From: Richard Weinberger To: linux-mtd@lists.infradead.org Subject: [PATCH 2/4] fscrypt: Export fscrypt_d_ops Date: Thu, 14 Mar 2019 18:15:57 +0100 Message-Id: <20190314171559.27584-3-richard@nod.at> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190314171559.27584-1-richard@nod.at> References: <20190314171559.27584-1-richard@nod.at> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_101635_267935_82771656 X-CRM114-Status: GOOD ( 13.41 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tytso@mit.edu, miklos@szeredi.hu, Richard Weinberger , amir73il@gmail.com, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, paullawrence@google.com, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org If a filesystem manages dentry operations itself it might want to re-use fscrypt_d_ops. Signed-off-by: Richard Weinberger --- fs/crypto/crypto.c | 1 + fs/crypto/fscrypt_private.h | 1 - include/linux/fscrypt.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c index 4dc788e3bc96..8018f8bba50d 100644 --- a/fs/crypto/crypto.c +++ b/fs/crypto/crypto.c @@ -357,6 +357,7 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) const struct dentry_operations fscrypt_d_ops = { .d_revalidate = fscrypt_d_revalidate, }; +EXPORT_SYMBOL(fscrypt_d_ops); void fscrypt_restore_control_page(struct page *page) { diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h index 7da276159593..bced1ee4fd64 100644 --- a/fs/crypto/fscrypt_private.h +++ b/fs/crypto/fscrypt_private.h @@ -125,7 +125,6 @@ extern int fscrypt_do_page_crypto(const struct inode *inode, gfp_t gfp_flags); extern struct page *fscrypt_alloc_bounce_page(struct fscrypt_ctx *ctx, gfp_t gfp_flags); -extern const struct dentry_operations fscrypt_d_ops; extern void __printf(3, 4) __cold fscrypt_msg(struct super_block *sb, const char *level, const char *fmt, ...); diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 7139a110ac4f..2b9577e4707f 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -231,6 +231,7 @@ extern int __fscrypt_encrypt_symlink(struct inode *inode, const char *target, extern const char *fscrypt_get_symlink(struct inode *inode, const void *caddr, unsigned int max_size, struct delayed_call *done); +extern const struct dentry_operations fscrypt_d_ops; #else /* !CONFIG_FS_ENCRYPTION */ static inline bool fscrypt_has_encryption_key(const struct inode *inode)