From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 5FAE837F002 for ; Thu, 9 Apr 2026 07:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775720669; cv=none; b=qHDX5XR+fbOrbA7YcMtgH3Yhx4pxyv8lfWYOySTYNDUx54tsOHRg5i8nI57b8cVomVh/n8RkyJawn7qQza476wMH8T+NKaGVV1/QWkoy8dVQ8DjHMt71fDgs6t0HmjFp7nhhVIzv7QEGo27NkndVqeHucdPktwNE8NuV/Ks52vI= 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.47 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-f47.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so8074185e9.2 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=f4EzCeCu/CQLD/oSCP3uT19Hg9FDq4Ic7EqXGyF8m6EiR0ZTCybtdOL1rIK/NUriF2 Aqq12feV4yvmQBTWFtcC9TvSGHZsa91KkvD0uy+AV7fjHPk8IWEgq7uIcZSNud1fV+PS t9iHCxtUJ8U0FltB9ZEyopcAakbwMwN8nB9gE9yF5sOFjEI9mUveGT6ahV7DwNaaqIdw KKVoGrDqBLg3o11yjEejxcV1dLIVQaAwMY5xrixyfTNQ/Eg8tpn9OCHDqHy7SyJJYJLo EgNmZ1VH+SVmFrWAnsplpeMVUSbHPnjBAPN1zF7JfgTvTGMP4ETTqU26+Zz/1u+3hjq1 7xXg== X-Forwarded-Encrypted: i=1; AJvYcCUuaBURdzpvayPzt1/KPoqNm3T0pzk1XJP2NEtr+SXCS1ajwGzv9cnBIhI6qvflQwRoR3YoUTy8rtCtdXNDe/8=@vger.kernel.org X-Gm-Message-State: AOJu0YxYK56yIxqxzMD3BHDlZRvrqAcrck32BOmrSnkp1dtq/JmdGkUa nnc9bUJaMkJne5yERFTk2gcSKMJ/JHjpkRNEYg2CtkCLT8Dz/sxger+/ X-Gm-Gg: AeBDieuofF9yYmyskJ9OCDai/AtTdchoxZP5VMZSsTeGotGE0F8yxCl/rmBZxqf/RvQ Khxls9RQCWLMAj+0ixPQJ9hY53mARKNLIA57OUvWYtEO0e8hb9GBRtzi3cnjyUlWJsTHniUSZ9g 7hG3RFPuJ/B55dAntvR+4CW9xUZloMeqqR4cCzZK937vimLZT2hoXJyVKMIAhlwOgW2cBws/KoT nQaCe3DvQMUpxzkMcDsg1hsWmnMyaZyigG0M4IC+Xhba03+g5HTv8p2Wb7DJvjLpnCzjVztWuZK gR4QzFDd5g5G+hK/IQU0OY5I6aAe9FqOth4rr9b/1P+uZorbzSG8GuvnTnCaavnSHX/0ftG6Odt A5sBktH0YUeE08EcKx+U+Mo2RTM6A5ONcU97i8sd4dgw83sLaynWJ30vVwEruroZisOgHqFdtO3 NiJ4Wpu3cTp74JMKaUJiTdM1c96GKmdwOAhvNISp2qAU/Gx/0iESDsXTrizeEB7nGZ 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-kselftest@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. >