Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp229204rdb; Tue, 19 Dec 2023 15:03:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqIy+qJMQFggs0opDWqyyYZJgxebVWVhi6QZe/pLTGbfSqNf9Fos/78XUftTAzFB8K99p8 X-Received: by 2002:a05:6a00:6c97:b0:6d8:b706:ed10 with SMTP id jc23-20020a056a006c9700b006d8b706ed10mr2430306pfb.20.1703027018530; Tue, 19 Dec 2023 15:03:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703027018; cv=none; d=google.com; s=arc-20160816; b=Wyq4ali3qqq4WD0i2n5cubfdVLR4da+3xuRUztg1o9931WCgv1EoIOS06+dSxGLnvR 5lQNNcfbuqgFfdETQXlSNeFMMheq1MSMtnU42Kd+gpbH7apdNZGGFM/u1WF4x1Z74/ml U2aQlxhoksnGtiEU6wuQdwNtLuBHwlX5+VD/BeulF2GRJWewc+O6cJa6O+4g3Pt3hma9 4HH0dDVlaGI+dd69ZG2X76qgTZlZC9vuSC9B52EiicfdJGL7RVduEub77mosvSP0sr1d IFNjgYKti9hxHv7ZxgIrqE/TLT0CioUkKhsKIz6LeJCdVfiXtZljOBhhqv52148AJUX2 Njiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=79VWTGiMBeHxH3yWS8yWgo3mhnvv2zwWTu/erKht3pk=; fh=TBQtGPAwpHWLLfGWNdLhxG8+7Hpfce/nym2WwbyQEuY=; b=fT0+TF4g9HGC7/EBn0BBOYYASCqYqJdguPYZ0Bja54GpE1yCoUTnZp7yQ1dNPW4xeN GBvpePy2Ux8Lam6eIcamA6dGQHdVOBI20hiyd3k6meA8MtCdFF2MSuRolTEao40uKHl9 fvDXLmjUY8ijiwZPrnvL9Hi6opPkjcBU9gccX/A20/lgN8ymiWw9dR+FsjYk2G6RNfLs nbvj2mgWYedQ+FNcs28SBgTQscqnntZcMQoQQz5W9nGjXN0y8cikwhhcgiufmi1dE+UA K/trO9ToEDsKKUpYVXw1mKkVL20wjpKM8AMKcgP7y4JlvJx2jhgFxJbryqpva/8k5XH4 1z1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NICUtxZI; spf=pass (google.com: domain of linux-ext4+bounces-505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id cm27-20020a056a00339b00b006d93cb28e47si1192545pfb.122.2023.12.19.15.03.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 15:03:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NICUtxZI; spf=pass (google.com: domain of linux-ext4+bounces-505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2745328817B for ; Tue, 19 Dec 2023 23:03:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 270BA3D0B6; Tue, 19 Dec 2023 23:03:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NICUtxZI" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB95340BE1; Tue, 19 Dec 2023 23:03:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEAC7C433C8; Tue, 19 Dec 2023 23:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703027010; bh=LNmSsgchdIM5Serkn5TMo0rc39sfS64h30ok6s8DlJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NICUtxZIkUjCtz5zbDbYueae5fCt5NL880XbS5YavoRvFdNWiL6bGngTArDmwxWwg IW1R3j2Mzz7JPoB02rKLhy0jgO1P2/b/TDwx/OdODB3PX8Q/Rsi8JOz0d6Xua3gVnV 8Yljsnztq9AZ50G/4/AGIvtKsVn+IImctooi5Ijh7vCXvZz1tV0Rg71sDr3vYINfpx uqekrEQOnjA+AxHoSeh843klIcTqFxExNYi1tifGx+nzFg1hQG6Zn0vjrdgWGstHcb IQnn80cxiXcPBKllqA+ttY/KpZgsAkmgmb4oo3L8MDMMwga8+W0Q55E3x5/QczkXMW lUSZD7Ejk4l4A== Date: Tue, 19 Dec 2023 16:03:28 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: viro@zeniv.linux.org.uk, jaegeuk@kernel.org, tytso@mit.edu, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 8/8] fscrypt: Move d_revalidate configuration back into fscrypt Message-ID: <20231219230328.GH38652@quark.localdomain> References: <20231215211608.6449-1-krisman@suse.de> <20231215211608.6449-9-krisman@suse.de> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231215211608.6449-9-krisman@suse.de> On Fri, Dec 15, 2023 at 04:16:08PM -0500, Gabriel Krisman Bertazi wrote: > int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry, > struct fscrypt_name *fname) > { > @@ -106,6 +110,10 @@ int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry, > spin_lock(&dentry->d_lock); > dentry->d_flags |= DCACHE_NOKEY_NAME; > spin_unlock(&dentry->d_lock); > + > + /* Give preference to the filesystem hooks, if any. */ > + if (!dentry->d_op) > + d_set_d_op(dentry, &fscrypt_dentry_ops); I think that fscrypt_prepare_lookup_partial() should get this too, since it sets DCACHE_NOKEY_NAME too (though currently the only filesystem that calls it has its own d_revalidate anyway). - Eric