From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 5B65A37C939 for ; Thu, 9 Apr 2026 07:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775720669; cv=none; b=K0Bb0K4ihsvfQPrXtvFFCXExYTXKRThhgkhy/dKKJPwtBd08vEDElZSURwmKPtHrqGqTm8ooA+hWusBVKx5xzJKO6gSSjiDcadOVe+p2iQYM2teeGqQcB69eoGgbocy1QNH/OMWAVG7X5KxU6CBpLk1SwRpfdt7l5/KgvMw9bUA= 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.51 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-f51.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so8074215e9.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=MuWX6uZu/KO3vbthf78x7ghCjEMcFFrXpKtQYUSwN8ZkwFAZCO9NvuoKcv6Erj4PtB W8/4wdiFvzb7pTnTh8tHwU9ESDZa9Qs5D1+D0GeK/raZXXIFDpabAFSwiXOlRANhE1YO /dqLTMv9ybZt67kYxOWx7RZ/YgaNxZpkrgwwNB/Yb9wgh+admpBWEIEYLxIDboDOgzbQ Jae3aOk54goTWsB9ARbOE9gNeIlkytRd/TWsAo/QC796ub2SIUoiC35SWyU5RFbBcCRF TSQ7PUN58/YEgqa/aIyx4PqFyXgDoAuKkQn7HUbyEv2MUa9+1xWHy36va7MwRRLH65ad 3l/g== X-Forwarded-Encrypted: i=1; AJvYcCUDLC460M1LSz/Z5TxfRf6eWM7WbV54s7Hny7KiOjDD1ZkDDyAldw+Sk0ypGtLiNl1uAfuiSSriB67MULt/@vger.kernel.org X-Gm-Message-State: AOJu0YwaogrPwQpXGp+ZC78GpbaTugCpNcDXcUJKiXeQRgqmkpG7dl49 HwjPUFZlABH+4fqnaU7FPYeDhRlDPIDZUQyBCImrADW6o0ehxTZ9TeRt X-Gm-Gg: AeBDievnkykxOAvm2kUmZk0ELmhxnNfzogxaL//51ERk59sOzkbX0+90jw98X2qJKyc 3e9hkPcWfggrhJCi4rrxCWxpVz5tkCzu12S443JuCVXqC2L0XHOsVUQjTh1663taYFdUyethe1s qZrt5rtcuZDzXQLKVN7P9yzfcIo2pA4Fh7hV+7TTnsiHJZLtBDbRvk1SGPL2+Vhn7bdzdAzCZJo tiewe96xObLBaSCJau53vc7snVfUKmbv0D/0xI8eOfazUzYXN2/BUdvddCuo5SnsG/eceP8DV8z f8J7l7SYBY79I2PIOm3dBAXM72B254R2sjctJk4ZxsgGDDBjX4tluiz6Dlr0yxtkfzA2zOCkGJd Pnz6F3LiifWfNO7m/6pdSPhsaCW0/wj34n9zLf0fOzysZBtbwNzkajkKW9p7AqUgxzG2LRdH0iD B7sQJGIcaJaewm3naGmkdgRD5G5XvVxpBtQqu7bsSEgjjzgF3831y1ruULw97cUy3r 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-fsdevel@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. >