Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp631517rdh; Thu, 23 Nov 2023 13:52:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdoTZ9JVGZR1EtNa6kkZlb4BsU2AacUS08a3oO00aZ4o9P2OjWnEqW+KjERcgcW8sylxCu X-Received: by 2002:a05:6870:f10d:b0:1d6:4b84:c7ed with SMTP id k13-20020a056870f10d00b001d64b84c7edmr677277oac.23.1700776372426; Thu, 23 Nov 2023 13:52:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700776372; cv=none; d=google.com; s=arc-20160816; b=l6HLnW3iEto443W1Zxo6k6+NMP2uoSJP7xgZtkIsoLVGmpIXdgxD8Uh8/qRSFY6tcn Pp9jKJtZ0h5qD1/uRAdPruWIzmJnJOI5OY6d+vmrTmi5e2rnsTE2s6TbtW33xu2ulv64 roVIV39NmtzgOs4x8/O+Tk24SzirgVPD9waD5jzvpdSKyZQAVESdCXpCXAUcXqmzmqUy XBJob25e5AwBM9wEITjRpSwod90BozBc+wXR3Lu1zWgulgB2GAF75DquEx9voZVsEmv9 iRYmV5kyhVcwY8Lmgugy3QPAvq40N/Pc/P8AeiRS+VTTTMOkrUXBvEBZUL5MMPrAvQtP z+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=3YrLjUsJBUZ/bf9EaibULjJMkvXQZ6F4MemzMTeG2xs=; fh=gxv0fCHfYwuzCqrYLAzXebLQ3ObLAcpwLwX6rCnNp28=; b=0CJA/kJGDz7fcke6+L3QcEhIrJPfkjLOYGD9+munZjZpQdmFCTlSAR73SRWgEIJBH3 yJdD8gbr+hMzICTYEnZBxri69olUOvoh+pXi8Sh4uOqSRkKjIrsmCgdcWXfE2CbZ+eUE pQ4gpAGBaRaTb5CM1XYwrTm9t7hUgx/UtxxXIl3Id10BrSTudM26K4LCXnNaXWU6dZjL cgRffSOY8V1ZwBYB0QGwNz5w49jrKt+G549y9zd9c0FI4CPlv1vOmfKhsdF4U8jKeyar j2SkF8gX+Esy5w/TtWi9CrMcZvQCoPRp2Qw0vEDlGSugwy78g3p/jo5YQkjiRNrCNg6G 6T8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="V/sOzXqb"; spf=pass (google.com: domain of linux-ext4+bounces-135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u29-20020a05622a199d00b004236de1224dsi1955407qtc.86.2023.11.23.13.52.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 13:52:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="V/sOzXqb"; spf=pass (google.com: domain of linux-ext4+bounces-135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EB0721C20B8C for ; Thu, 23 Nov 2023 21:52:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97D9C18056; Thu, 23 Nov 2023 21:52:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="V/sOzXqb" X-Original-To: linux-ext4@vger.kernel.org Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBBABD68; Thu, 23 Nov 2023 13:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3YrLjUsJBUZ/bf9EaibULjJMkvXQZ6F4MemzMTeG2xs=; b=V/sOzXqbleSNlNvhcFnifsfTSi LlpDm5blpb37lUsF0cxNGOlevEPrYSj+W0nDw5f71OEBej2S1XdNBcMGk45KrF3eMrH9tmGWfbC4o hdFEnuJXXiW70XHQokbDrwUP2kEHSks+adeTf3jkvN/ud6qKju8/Tp55UB7P4lmiRirr3FmDLwLqz Arg1zOnwLhCFVZ3ZzKnUAobBwMlckYxIZSiFNpEGyt88azwPTmXxypcLLkSbMEmAPNwCxGebrpWUC jztkZ5uRhna9SX/x0le6tswJQzWOfPWxjY6V0bQkfZe5ZDENuNOy1ZkJ02WHQzYsfCxRs4qDOY3cR Y2ZX5wow==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1r6Hcg-002GWu-2Z; Thu, 23 Nov 2023 21:52:34 +0000 Date: Thu, 23 Nov 2023 21:52:34 +0000 From: Al Viro To: Gabriel Krisman Bertazi Cc: Linus Torvalds , Christian Brauner , tytso@mit.edu, linux-f2fs-devel@lists.sourceforge.net, ebiggers@kernel.org, linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org, linux-ext4@vger.kernel.org Subject: Re: [f2fs-dev] [PATCH v6 0/9] Support negative dentries on case-insensitive ext4 and f2fs Message-ID: <20231123215234.GQ38156@ZenIV> References: <20231025-selektiert-leibarzt-5d0070d85d93@brauner> <655a9634.630a0220.d50d7.5063SMTPIN_ADDED_BROKEN@mx.google.com> <20231120-nihilismus-verehren-f2b932b799e0@brauner> <20231121022734.GC38156@ZenIV> <20231122211901.GJ38156@ZenIV> <20231123171255.GN38156@ZenIV> <20231123182426.GO38156@ZenIV> <87bkbki91c.fsf@> 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: <87bkbki91c.fsf@> Sender: Al Viro On Thu, Nov 23, 2023 at 02:06:39PM -0500, Gabriel Krisman Bertazi wrote: > > > > 4. d_move() and d_exchange() would ignore the value returned by __d_move(); > > __d_unalias() turn > > __d_move(alias, dentry, false); > > ret = 0; > > into > > ret = __d_move(alias, dentry, Splice); > > d_splice_alias() turn > > __d_move(new, dentry, false); > > write_sequnlock(&rename_lock); > > into > > err = __d_move(new, dentry, Splice); > > write_sequnlock(&rename_lock); > > if (unlikely(err)) { > > dput(new); > > new = ERR_PTR(err); > > } > > (actually, dput()-on-error part would be common to all 3 branches > > in there, so it would probably get pulled out of that if-else if-else). > > > > I can cook a patch doing that (and convert the obvious beneficiaries already > > in the tree to it) and throw it into dcache branch - just need to massage > > the series in there for repost... > > if you can write that, I'll definitely appreciate it. It will surely > take me much longer to figure it out myself. Speaking of other stuff in the series - passing the expected name to ->d_revalidate() is definitely the right thing to do, for a lot of other reasons. We do have ->d_name UAF issues in ->d_revalidate() instances, and that allows to solve them nicely. It's self-contained (your 2/9 and 3/9), so I'm going to grab that into a never-rebased branch, just to be able to base the followups propagating the use of stable name into instances. Anyway, need to finish writing up the description of existing dcache series first...