From patchwork Fri Aug 21 18:28:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 11730251 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ADFE41731 for ; Fri, 21 Aug 2020 18:29:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DDBE23100 for ; Fri, 21 Aug 2020 18:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598034564; bh=T/M4OXWBroU11ggvljowQQvLMcwOL2ubdcuKlfIqQhM=; h=From:To:Subject:Date:In-Reply-To:References:List-ID:From; b=sqeoqyTHHNS8T7lgS4z9yDBTFXkI5xkyR+vfkOfEv4G3plGtN5t0lqm8HKrRssoDM nSYj7VjN/KAHxSx6jnvG8Ubh145v8stvAZZJDJjLCUL4qdbGli1rql6BXXgXRFyVPs 9UGtYh3MRqh1O1YkuEZfh0a5uBRqnVKqkk2muvZE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbgHUS3Y (ORCPT ); Fri, 21 Aug 2020 14:29:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:59380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgHUS2R (ORCPT ); Fri, 21 Aug 2020 14:28:17 -0400 Received: from tleilax.com (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B4E3D23102; Fri, 21 Aug 2020 18:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598034497; bh=T/M4OXWBroU11ggvljowQQvLMcwOL2ubdcuKlfIqQhM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ws7WjprIgvWrQ/Ea1qTDlaAZQIAZKCF1KvLsGG5FQaWdWPisP730+LZ4UMd2iDU6t LRDgWix4Su3gJmUc7Pzrdh3yPkzh89ePrWkHE+HPs6wEGoMsxhNKpI+TmsROh0p2e0 HKodvJTk6AV4a6qUKIiMoaIn/qLP9Y2qrkQ9gSas= From: Jeff Layton To: ceph-devel@vger.kernel.org, linux-fscrypt@vger.kernel.org Subject: [RFC PATCH 04/14] fscrypt: export fscrypt_d_revalidate Date: Fri, 21 Aug 2020 14:28:03 -0400 Message-Id: <20200821182813.52570-5-jlayton@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200821182813.52570-1-jlayton@kernel.org> References: <20200821182813.52570-1-jlayton@kernel.org> MIME-Version: 1.0 Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org ceph already has its own d_revalidate op so we can't rely on fscrypt using that directly. Export this symbol so filesystems can call it from their own d_revalidate op. Signed-off-by: Jeff Layton --- fs/crypto/fname.c | 3 ++- include/linux/fscrypt.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c index 47bcfddb278b..9440a44e24ac 100644 --- a/fs/crypto/fname.c +++ b/fs/crypto/fname.c @@ -538,7 +538,7 @@ EXPORT_SYMBOL_GPL(fscrypt_fname_siphash); * Validate dentries in encrypted directories to make sure we aren't potentially * caching stale dentries after a key has been added. */ -static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) +int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) { struct dentry *dir; int err; @@ -577,6 +577,7 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) return valid; } +EXPORT_SYMBOL_GPL(fscrypt_d_revalidate); const struct dentry_operations fscrypt_d_ops = { .d_revalidate = fscrypt_d_revalidate, diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index c5fe6f334a1d..41300eac45a4 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -208,6 +208,7 @@ int fscrypt_fname_disk_to_usr(const struct inode *inode, bool fscrypt_match_name(const struct fscrypt_name *fname, const u8 *de_name, u32 de_name_len); u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name); +int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags); /* bio.c */ void fscrypt_decrypt_bio(struct bio *bio);