From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B6E537D131 for ; Thu, 9 Apr 2026 07:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775720669; cv=none; b=JRmoNfsQ+zJvNYQk2lts/hro2wlZ02NN/+Ve1K7KR/hNHOXIqq5Ytd6Pz1avsjGSm4MT1BexOHT4Qm//rA/9FjmVaxt3qxsG75C2Rx15hiv9o75UWdFK+ytG+KjfoBc4g3Nh0/KJ3fOu0eCcHKj/Ygxq+fIL/iyG4IWbD/o1DR8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775720669; c=relaxed/simple; bh=JHc0rpT0VXACQqLal9pb1BOk7zluaiOXSCKc5SYV09c=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q6B8vEpWLchAGafScxVFHm0Tj3apUN3UNYDcZwHoe7oBNS0zmXalz6JB7y/VmoiwDLVvcrRzIHnFjrKDVlUfLYigXquxcNyMqZwT/f+SGNRLRy8V+vSwDjNZkA7bR2MGsvnuJ1LgzeArk4+jRvrUzTxXlI4QEJEE2P7e3pcYX2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SO+NcJvH; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SO+NcJvH" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4887f49ec5aso7602275e9.1 for ; Thu, 09 Apr 2026 00:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775720667; x=1776325467; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=5zM/QUh5nNxcZ3yr09S8to3CJRO3tIlUiWsJb2TzILo=; b=SO+NcJvHFD/9qe5Egn3P6W48F9CZYzAPtrX4GdPVGj6g81/E7eZhu2lVIvZxQfA118 G5PONf+ut98XxNhHFDxd8IR/kHOMMgXsvkfBd/T/Pxy1MdGs5R5bz3l4+XjhJtGN16wq bc5nQ0YyAldvDNkDM++3VlkHs3oEt3dxlCVePCwOBYBpe+8MUIXzoFWdXcQFpZkwLc/N d8Lxf8uss1M+AkpgRWnHIdL+G8b6bNVN3MZninzXxN8cSoV6F6ISO1qrOB4a9EYiTJ0Z IUczTDc2hIDx2Z86juPoCMQGvDV6hYARmUak2ZPTM2wj9tneB7YoO5LOd97QpepX52tp 1/eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775720667; x=1776325467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5zM/QUh5nNxcZ3yr09S8to3CJRO3tIlUiWsJb2TzILo=; b=ZXLydkRr8YJc3BwdDhMcD3IXL8ihiiDSppMbBPprdjuywWilX1BM0o2fP2njUAWaJD AaZYRJKDORdDSgn4mySFeSYDJ6NBMI1b/Stg8WMDyUc994XglFBHsL2hjvNMgG9roxya kLJ6kT7S4uoMoShqd7KoYVnHFX239N312X3KpJdI6g7sOPG6eMVVPniLL3hEM744CQg1 PIiCYCYT1Q6ckAKk3TUM9uuP0C0HsTmERBUV0w+wwYKckjuF+rjw+2OReaF2Rhp6t01v tUjoiRgHVhsBX/ZgJBj5L4nxvli0Tt8QnMAJ6AX/1ujpmLanS+0P2Mvbfspv+NyFVQ+M oHOA== X-Forwarded-Encrypted: i=1; AJvYcCVp1IwGAGuWDOq96TlVPNRocux4z9b6H6tYiH0R0fNNGKOwVxrcom2QESNIOZ6K5wrZdQNJt+ra+Mg=@vger.kernel.org X-Gm-Message-State: AOJu0YxtglulalxpD+oPAXWwQBf1Ve6zF4zMyF3EF1RA6hJvwjO3PMeY eunrhuFlpBGDSrJSTt9yCYCP9H7UwyaztyKh1Vxr3wMZqIFBQyEuJZNH X-Gm-Gg: AeBDiet+e5AUkVw0+nnvjt+eW1UBgirEMYROPhPV23qwMr4Nu/xiqF52Uh23daVnR3q yiw0wu9rxcsrVJ3y64nGsb0TNAA+gGJZsVn1ppU25YAIwvZ7l9Vz69oiaOchN12Tl3bTzhYykFc H2w1N4IK7uv3S2M8XHOUb61W7e58E21AHyJrMoqBUF5nobIUrOsZrC2yHmsDxDo+1S693PhyvMp /xpsukzQZuVgu27EDgx8C1vJnTeFBWd42cvAayiBgqJR2EuKbgjpydjMWSrwrzv3B2khaSkH1F7 BKCRKgCAty3wmw1V0G2VP4LSIGm+OYNiZXNP7UlkJj+nBf8409WuDoINMGoS1J4dzaOGMfyMxYI FQpGI4j9HX3Fggz+lnSg7s8CK6MIwKD8KuZRuqLdBl1kjp/YNalEgLGeWRIElMM6MVUH0lEAC7k oNoDlIOYa4x4OoRQnXpyEwbd0CNgeeDgq/pLZycZpgXo21fRwN4R4EmpV2/QlkpO1J X-Received: by 2002:a05:600c:5292:b0:488:8c89:cfaa with SMTP id 5b1f17b1804b1-488996b021fmr370012665e9.3.1775720666526; Thu, 09 Apr 2026 00:44:26 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488cfa759bdsm33438345e9.12.2026.04.09.00.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 00:44:26 -0700 (PDT) Date: Thu, 9 Apr 2026 08:44:24 +0100 From: David Laight To: Jori Koolstra Cc: Mateusz Guzik , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Alexander Viro , Christian Brauner , Jeff Layton , Chuck Lever , Arnd Bergmann , Shuah Khan , Greg Kroah-Hartman , "H. Peter Anvin" , Jan Kara , Alexander Aring , Peter Zijlstra , Oleg Nesterov , Andrey Albershteyn , Jiri Olsa , Mathieu Desnoyers , Thomas =?UTF-8?B?V2Vpw59zY2h1aA==?= , Namhyung Kim , Arnaldo Carvalho de Melo , Aleksa Sarai , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, cmirabil@redhat.com, "Masami Hiramatsu (Google)" Subject: Re: [RFC PATCH 1/2] vfs: syscalls: add mkdirat_fd() Message-ID: <20260409084424.6030eea2@pumpkin> In-Reply-To: <1333067272.1649333.1775682991132@kpc.webmail.kpnmail.nl> References: <20260331172011.3512876-1-jkoolstra@xs4all.nl> <20260331172011.3512876-2-jkoolstra@xs4all.nl> <1632825771.784338.1775039101736@kpc.webmail.kpnmail.nl> <1333067272.1649333.1775682991132@kpc.webmail.kpnmail.nl> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 8 Apr 2026 23:16:31 +0200 (CEST) Jori Koolstra wrote: > > Op 07-04-2026 11:00 CEST schreef Mateusz Guzik : ... > > I am not saying it's impossible. I am saying mkdir was always a > > separate codepath and in order to change that you would need to add a > > branchfest to open. I don't see any reason to go that route. The open code is complex enough that an extra branch won't matter. > That's a fair point. But there's also upsides like Aleksa has mentioned. > I'm not very opinionated on the matter, especially since I don't know why > those paths were ever separated. I doubt they were ever joined. mkdir() is more likely to have been separated from mknod() when the code to add the "." and ".." entries was moved into the kernel filesystem code. I'm not sure when that would have happened, mvdir() was done in userspace with the link() and unlink() system calls until (at least) the mid 1980s. It was probably the complexity of locking in SMP kernels that make both "." and ".." be 'canned' names rather than just references to another directory. (Yes, it used to be easy to make ".." refer to the 'wrong' place and get find to loop.) Of course, this all predates Linux. David > > Thanks, > Jori. >