From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 62DEB37F735 for ; Thu, 9 Apr 2026 07:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775720669; cv=none; b=H9ES4jrLQ0++hWzL96XCJOYAyxYKwzbJDhm3OPZ/PseouGnEY6JHhcmf59tsemsGXv3Z9hvg9Nkb0xpO6P4MSHsVJ358mzTLagnAt/VZYr3X1/JSg+fc2aoemx+H3fuVULOH0AdmC/IZdFJ7poIeppqp7Xw5ILFqctd9boBIB+k= 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.45 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-f45.google.com with SMTP id 5b1f17b1804b1-488a8ca4aadso5885675e9.3 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=ZypAjTIdKv/o/KMhGC7IgMcMZP6p4MRYZLanlPibNDSljicLb2YQXbl5WeSzZh3zTm S+5dbiSSctwTG3VxlXFTWAwMlAiQ1xyf2mMEmc3MU1aC4PG1pol45xxZb9iLeZc3lRE/ 0wu5n+l+9FtvpWV2/RfED7cu5WEyJv+K+2Z9ZZdw1kpjnssBfy1S0tfqdpT0NcYJYvz4 6aHH9/B2+9BFnCFSZcW097ij1MYJ09QDOVTsXVS6XUKlRyJ6jwEuoK3z5nFf/BgO5EMi F4ZH8uZy6TSn+mFf/btCHSG/8+Q/LQiYtFaSstrPnw2yZ6KgX+fNoWsKYhXoMusPSN6C RbSQ== X-Forwarded-Encrypted: i=1; AJvYcCUnd+uf0Qi75nJnadMqXVsol2o/AW30fNXvgofe23+HnzSkk8K0RNYlGchs+zc2qqMLZ4w9zpHH9/ShySo=@vger.kernel.org X-Gm-Message-State: AOJu0Yya+3bHBCR2VBTJi6go/JyXIOO7LhctlJyfXkbSn0WfXCmiggxz wG++y5W+T7QoXcam168zW7en863XnwXRm3AfDEXK+VN+Du0VRem2SAmh X-Gm-Gg: AeBDieu5L8hikNAEjrR5cApexHB0LDaGZuhtL2yJKAkG2+zuEBRK1GcuGnA6wOgBAxh iUQSW9JEMYyrPgHtfemOoikssSUrX8y0HRyovW933s1PVQLe3W7BdIzy7VSefMY1KiciNKlIfyP 9BJSVcLl5R0ZYWd/wj5A1zeOVAw0XxP+AV76+xxH/VBDfdntdmcJzBfcgwtxEcKZYVq7GSLgj0Q RwUdth7L+MscyosOr/mXdfxytna25NzFT2GwwNQhPFQI1AOjkmoErZuwEpzOEt1P/+urb3YRDsd 3Zj+z5Gvg2/VDof4eK1/BGHAiR9Wujt0rYGoDrJAs/APZ/7LB6TrtFW3HRTOcz2OJS4Q5n1oxRr 3VY01jIr08+rZKFV2HW4s9BK4kSJjyKCrxJWFxh3DEul0RUTl1AszIlJVIWQ9zsKPGxTwXyiavz k/MjNKQFxKSGYJ/JmiC9ZVsbJju3PZTOULTpScXbdC2oNda3l2pnUICQ8ABfDvbYtf 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-kernel@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. >