Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp166849pxk; Tue, 22 Sep 2020 23:02:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8seRjksre1kJduKvuMYZfwljz41FTpX4ggTQ8TCTrqJaBTCS7+iwOw0qp/+7d4Tr0xTGA X-Received: by 2002:a17:906:71cc:: with SMTP id i12mr8550499ejk.507.1600840943356; Tue, 22 Sep 2020 23:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600840943; cv=none; d=google.com; s=arc-20160816; b=CYYw5ixyzqWx9GC9USWm64Hq6KCxPm+NdYIFS8WayRXcSw29lH3vuhRUgUTtVSCErm ZtQq4Wn49o596dYsrZKR5KgF5mHYzjEiocXL9uzwOK2u0U7AEv/o2Ij4W0EgMxvTuBd1 vQb8dGLsPIdEm8Un+BSCGY0dc3sNRNohA+/GqqN8WWtryAvAAOmSKwEdlHGrkOJkN/dw 8519qRIV/+V5OeTFEJDo49j6u0u0J/sEq2iesLKx0t+C4QbB6cfZcU9NdSldBBmzOKdN Lwk3oT72TxZB/aLP9jJvZRl2oTs3+2R7s3VP7v6uYsxPldy5TKIcGSk7OwaeMDZ1XaL8 SISQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zQg/8fzf3YsUqfG31jPTFmC0O31v7k/VO6H9niwMa/g=; b=EcuYY0/45IPLH1j/3CEFkxok4XZ/KLR/yZlypq9D+BRqzE5Jo4yByNoJxwq/WscYyE VSE0GCXiTYwDuh7AMeRbFx2ijBLvrJYeGNuL0S9BU0cTxAgCKT2pAdotc9jivO+qAV3I 8alJ3bI8imhVPLQdoimPYZVWQO+qlwAucJhwfkIQb/EGEu+wwuZazPlGUh+KjKLjSDfo W5mzd6Ulnp/Ey/8jQmPdfz2vwGai9O+Sno5BuLF4IM10dbKGCdQyvS47YtBLlh7H/BXH rsTLGtDqkYKYNQe0SpIWF5gbTM+J325FWeH5TjMBty5POZh0u2xAPWobeYHBhtQ0Gowj H1kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ma7PADmZ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si12256640ejr.369.2020.09.22.23.01.53; Tue, 22 Sep 2020 23:02:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ma7PADmZ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726640AbgIWF7x (ORCPT + 99 others); Wed, 23 Sep 2020 01:59:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:38524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgIWF7x (ORCPT ); Wed, 23 Sep 2020 01:59:53 -0400 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (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 73F0123444; Wed, 23 Sep 2020 05:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600840792; bh=I/8XzISzbBcCgYVmxLepZyG9w1CITHS3v+J9bySyNa0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ma7PADmZA95LLBo9KrXphWNWVsOVp+R73XlXBBcLHitEY4X5VwCFJSVq7vuCYgC3V HIT9jQdNXpRYH0Rkj3vSz4V7G9BGteBdDqsxV/pAjN1mmz6khsLf9uFQEZlx+JA+bt 9uHpKQjziJ+IY+pVDK+nuHCnTz8A3CoT7WQ/HOGU= Date: Tue, 22 Sep 2020 22:59:50 -0700 From: Eric Biggers To: Daniel Rosenberg Cc: "Theodore Y . Ts'o" , Jaegeuk Kim , Andreas Dilger , Chao Yu , Alexander Viro , Richard Weinberger , linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, Gabriel Krisman Bertazi , kernel-team@android.com Subject: Re: [PATCH 2/5] fscrypt: Export fscrypt_d_revalidate Message-ID: <20200923055950.GC9538@sol.localdomain> References: <20200923010151.69506-1-drosen@google.com> <20200923010151.69506-3-drosen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200923010151.69506-3-drosen@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Sep 23, 2020 at 01:01:48AM +0000, Daniel Rosenberg wrote: > This is in preparation for shifting the responsibility of setting the > dentry_operations to the filesystem, allowing it to maintain its own > operations. > > Signed-off-by: Daniel Rosenberg > --- > 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 011830f84d8d..d45db23ff6c4 100644 > --- a/fs/crypto/fname.c > +++ b/fs/crypto/fname.c > @@ -541,7 +541,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; > @@ -580,6 +580,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 991ff8575d0e..265b1e9119dc 100644 > --- a/include/linux/fscrypt.h > +++ b/include/linux/fscrypt.h > @@ -207,6 +207,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); > +extern int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags); Please don't use 'extern' here. Also FYI, Jeff Layton has sent this same patch as part of the ceph support for fscrypt: https://lkml.kernel.org/linux-fscrypt/20200914191707.380444-4-jlayton@kernel.org I'd like to apply one of them for 5.10 to get it out of the way for both patchsets, but I'd like for the commit message to mention both users. - Eric