Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2126520rwb; Fri, 28 Jul 2023 23:56:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlHpL3A9wF8ZEjpywzRb7eR1ZXqtxi18qKrvtz3GY5EYYfzUNBjIxEcKTw/b8Ny3m2NrW7Ox X-Received: by 2002:a05:6a00:340f:b0:687:1bb1:91f6 with SMTP id cn15-20020a056a00340f00b006871bb191f6mr1705413pfb.0.1690613783671; Fri, 28 Jul 2023 23:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690613783; cv=none; d=google.com; s=arc-20160816; b=dfL9wXM/5nNfBQVIlsC5feldW0h8SfMs6rypuxZR8Y0GP26m6JjmMFVvpSbJ8QyMVX ua182JkLp8Iu93SpusaE+pZkISgTGq31PGb3P9xNPVWp8nOmA75MfV08eGpC+vslCegD xq5UtXUQRoRFcieY3u0kqP6bJ2vrHiPseWxP87YpO83MWnR1FbRdmmkR1L24gkZU5oTL 3K8/2XN8Hz0LxIx5+bhdGD3i+PRhHfoKbPRWaC6UCxeIyzi2CirkDo+feVK/jQ95gnVd uCN0vYLd2JwUFmEuw+MLwr5Fg8G1tKF741N0dDzIQVRpPo3vLA2V9UYb6cB9F62EELfI MGVg== 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=82uhWJod7lIIaCNsKBPhvP9wNUVbXByQvSeS4aiYBoI=; fh=nL118WpnY3LGXPi0GP5e49DxM7+TEZhr95g9EGwQjuY=; b=GvNouQ7jSxmwPWPH5rFuXHSB0ZYdx/+yBxSct203TcMx4PaELuzNS9kOddl6dZCp9U fIUb7BWsSuRGYYEdQ7JBkDMN//AT+tn9S5O9QPAP0GyX5E8OBfBy5QVqpwq4F026OdVH l1D7Nc8GphCpC0VwxbjjDGSzeVaYFsVvK9Q1kfjhnfKCuaoUNiSzu5WRui1xmjnhvx3L PR/Fy0yJ9ThfgcX1QGBCU/m0Z2PPANR4X5XRjb0+peY6yHdWl+OUWLBE5C64B6wytBw1 0tP3SIo/16R9jTP3Oau7X0ASlUimTLL/9bCbNxAhy7IamYOpIdfdfZWm/79gYFR5mEny mpyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QUfHkctW; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p190-20020a6342c7000000b0055aeedd94c1si2828967pga.289.2023.07.28.23.56.03; Fri, 28 Jul 2023 23:56:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QUfHkctW; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229685AbjG2EwA (ORCPT + 99 others); Sat, 29 Jul 2023 00:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbjG2EwA (ORCPT ); Sat, 29 Jul 2023 00:52:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F94F19AF; Fri, 28 Jul 2023 21:51:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1EEC86023F; Sat, 29 Jul 2023 04:51:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A0C6C433C8; Sat, 29 Jul 2023 04:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690606318; bh=8CzHdaD4e57PvnCBD6zGsTCAxTvP8AnAGmWTWStQ05A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QUfHkctW5jrZ5oRfrm5BWOp99D4FhHHJ5FF3U/Cbwi6M4KINBV3OH7k0lEXiOAbqj m8cwbnIxa2hG76i7cjAIz8CZ3geskfUggZe46CY26qAzaeV8Z0B/W5Eh7XM6Zk4VU1 eScItR55iQTiAaWHlabzrprU9mRIiYxuRahKKeFas7Qjd5I+mHo54kqhBf9q/MMrTK 9zObyTz4OdaE9cV+3PJodwm8B0NBmSwonvQBpQ2NtiIoT1X5i45ALO70/yBFADPTGU Bk9QpnUEfSUi1vCVUswBy27hPgr+GocgZopvqRxB1O1JUbOHdLboxZ/PtMjKtcu8Jm qfC00n8oCyaYg== Date: Fri, 28 Jul 2023 21:51:56 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, tytso@mit.edu, jaegeuk@kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Gabriel Krisman Bertazi Subject: Re: [PATCH v4 3/7] libfs: Validate negative dentries in case-insensitive directories Message-ID: <20230729045156.GD4171@sol.localdomain> References: <20230727172843.20542-1-krisman@suse.de> <20230727172843.20542-4-krisman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230727172843.20542-4-krisman@suse.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jul 27, 2023 at 01:28:39PM -0400, Gabriel Krisman Bertazi wrote: > dentry->d_name is only checked by the case-insensitive d_revalidate hook > in the LOOKUP_CREATE/LOOKUP_RENAME_TARGET case since, for these cases, > d_revalidate is always called with the parent inode read-locked, and > therefore the name cannot change from under us. "at least read-locked"? Or do you actually mean write-locked? > +static inline int generic_ci_d_revalidate(struct dentry *dentry, > + const struct qstr *name, > + unsigned int flags) No need for inline here. - Eric