From patchwork Fri Sep 4 16:05:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 11758115 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 7025692C for ; Fri, 4 Sep 2020 16:07:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D0AD2087C for ; Fri, 4 Sep 2020 16:07:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599235647; bh=S7Q7gkC4y/mbKVLHfu6ItAlaHGFIa0yb/5QJj11p7O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=iAxC6ieuU24oIl9N/Sq3RpOJvH/6TIZbNheHPUmLyqFQadglIu227nIqSN5kxjsmw tOysTub4mggXaondESzjKWLMTmwwGe0t0cZDx4sJlEqUwxZ0AlF7hayjYzwVXFvdcJ IyPdDyUu30geNOBW83XsVVLQhI5l3aAzcnslev7s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbgIDQFq (ORCPT ); Fri, 4 Sep 2020 12:05:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:51286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbgIDQFo (ORCPT ); Fri, 4 Sep 2020 12:05:44 -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 DB81720829; Fri, 4 Sep 2020 16:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599235543; bh=S7Q7gkC4y/mbKVLHfu6ItAlaHGFIa0yb/5QJj11p7O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sF1KHYIOBOk45vkSwYkgisnkVju59uD1dVu+2SDJs1fhTM0AIndCw2vFh5Be5cFKt 4C3bz/69k0FNsefEWbAzSTMGM4IW7RIuFFUXIcQRd9aMGHhPwQutWWQGZoT1MOv5Aj pzdV+XbNDpv2dOYLm/+2lT4UXZSDi9nKQcVDyW/0= From: Jeff Layton To: ceph-devel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-fscrypt@vger.kernel.org, ebiggers@kernel.org Subject: [RFC PATCH v2 03/18] fscrypt: export fscrypt_d_revalidate Date: Fri, 4 Sep 2020 12:05:22 -0400 Message-Id: <20200904160537.76663-4-jlayton@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200904160537.76663-1-jlayton@kernel.org> References: <20200904160537.76663-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 81d6ded24328..16d673c50448 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);