From nobody Tue Apr 7 16:16:41 2026 Received: from flow-b6-smtp.messagingengine.com (flow-b6-smtp.messagingengine.com [202.12.124.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55E742BCF5D; Thu, 12 Mar 2026 21:56:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773352594; cv=none; b=lAFoLy4LHkA0PqKJY4cC0t0309GFAWPAmyb3nVjPOqRXUKJmuL76855sq/D3Ck9Q+tsBbIOJ4OD3WgkuSG12v7NWlgPHi0teuH1qN+33uVO5pz+2gG5k97/2mxt6rJ9frvDwjFiOWsW1V/YVFkBrBT51gS4miJtteKBJ9LA/+Nc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773352594; c=relaxed/simple; bh=Ry03XapnV8ZPqRwD/otU1U6sq93iLJCjUmdAQ3JSF0k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bKI8N9HQvQFeI9jGLO+Rrc7tmWB+q8atmJ7L8sq3DkL40T+JqDNjwatgVyoTgdx2mEESTb2ENXtUPxk63o3685bwMoboWzV4cgCIDl7lmkn07+RmNtgfAg/EdilFIpjZlHstC3HcPa8kknPeg2vL25aFST7AYtO+MQhwdv9434c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ownmail.net; spf=pass smtp.mailfrom=ownmail.net; dkim=pass (2048-bit key) header.d=ownmail.net header.i=@ownmail.net header.b=BjVQ7Tij; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=YpiNzHFW; arc=none smtp.client-ip=202.12.124.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ownmail.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ownmail.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ownmail.net header.i=@ownmail.net header.b="BjVQ7Tij"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YpiNzHFW" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailflow.stl.internal (Postfix) with ESMTP id 84D321301BBF; Thu, 12 Mar 2026 17:56:30 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Thu, 12 Mar 2026 17:56:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ownmail.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:subject:subject:to:to; s=fm1; t=1773352590; x=1773359790; bh=V1Hs5eklgfQn0H62/n/RsRquBHKKGkv3SWjXFgqWxeg=; b= BjVQ7Tij/z0cXHesrQNauBD40mf05TL+Wj6m1LoIvu1L/NzpAqGZ5cLMMYGVnhHH 5qpQy4Dpm9bq8Pb3bQ7SLoPEAN90xLCEzbpDBw32FsuGAR+9EIQaGhiqQ98SwOaT QOjIC4JQ26O0nUw/gfHxixp9O2LeLOAfcv7ko1la8I/jwje3ZAcm/+yUWtQegekd SEaAK9AahEsg1k6Lo05tjFqkn7nUv2p2kEM2DQJCJhauy4winthpmj9pCKsDjw+g LbL1Ut73HTaiBOaqfNeCA2hdtVcLqDwM9vhFb2A/Gp+vNDKEnvCIcGUBnuRQC5w4 c1vlq/YTLJZHkxtZdNo3ow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1773352590; x=1773359790; bh=V 1Hs5eklgfQn0H62/n/RsRquBHKKGkv3SWjXFgqWxeg=; b=YpiNzHFW7/D9ZPSMi cZJKUNBZwgvwypUiNaP/NJM1ssRQhwagO51x7MSYiJEweucl/LQJMa2SKCpn9TMY zKHk3Y1z+6lpK6TbV+SLBojRbVgzqxTumBjH8yjZlwb/Pw05pMeeuDj3VQASKNMH JI1m/tgCDLltyQqPzDgUlE9fDYaQup9pOGAFgK5F8pGZ2h+PJQKg0JYnhCf6Anpd cMP+lNg8R98vHR1s3CC4zCU3o+z2qTy8ZvFno6N0EEpF2DC7MXEjoQhGkqR0/QDv RkF1A/8dkZ52tjjo3Ye102S9dNRb2q+2o8wsWe6EZ9KjKj0zQND+rl+xPCwoT4um OVbAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvkeejleduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufffkofgjfhhrggfgsedtkeertdertddtnecuhfhrohhmpefpvghilheu rhhofihnuceonhgvihhlsgesohifnhhmrghilhdrnhgvtheqnecuggftrfgrthhtvghrnh epveevkeffudeuvefhieeghffgudektdelkeejiedtjedugfeukedvkeffvdefvddunecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepnhgvihhlsg esohifnhhmrghilhdrnhgvthdpnhgspghrtghpthhtohephedupdhmohguvgepshhmthhp ohhuthdprhgtphhtthhopehvihhrohesiigvnhhivhdrlhhinhhugidrohhrghdruhhkpd hrtghpthhtoheplhhinhhugidqgihfshesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgt phhtthhopehlihhnuhigqdhunhhiohhnfhhssehvghgvrhdrkhgvrhhnvghlrdhorhhgpd hrtghpthhtoheplhhinhhugidqthhrrggtvgdqkhgvrhhnvghlsehvghgvrhdrkhgvrhhn vghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqnhhfshesvhhgvghrrdhkvghrnhgvlh drohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgv lhdrohhrghdprhgtphhtthhopehlihhnuhigqdhfshguvghvvghlsehvghgvrhdrkhgvrh hnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqvgigthegsehvghgvrhdrkhgvrhhn vghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqvghfihesvhhgvghrrdhkvghrnhgvlh drohhrgh X-ME-Proxy: Feedback-ID: i9d664b8f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Mar 2026 17:56:17 -0400 (EDT) From: NeilBrown To: Linus Torvalds , Alexander Viro , Christian Brauner , Jan Kara , Jeff Layton , Trond Myklebust , Anna Schumaker , Carlos Maiolino , Miklos Szeredi , Amir Goldstein , Jan Harkes , Hugh Dickins , Baolin Wang , David Howells , Marc Dionne , Steve French , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Andreas Hindborg , Breno Leitao , "Theodore Ts'o" , Andreas Dilger , Steven Rostedt , Masami Hiramatsu , Ilya Dryomov , Alex Markuze , Viacheslav Dubeyko , Tyler Hicks , Andreas Gruenbacher , Richard Weinberger , Anton Ivanov , Johannes Berg , Jeremy Kerr , Ard Biesheuvel Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-unionfs@vger.kernel.org, coda@cs.cmu.edu, linux-mm@kvack.org, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, ceph-devel@vger.kernel.org, ecryptfs@vger.kernel.org, gfs2@lists.linux.dev, linux-um@lists.infradead.org, linux-efi@vger.kernel.org Subject: [PATCH 45/53] efivarfs: use d_alloc_name() Date: Fri, 13 Mar 2026 08:12:32 +1100 Message-ID: <20260312214330.3885211-46-neilb@ownmail.net> X-Mailer: git-send-email 2.50.0.107.gf914562f5916.dirty In-Reply-To: <20260312214330.3885211-1-neilb@ownmail.net> References: <20260312214330.3885211-1-neilb@ownmail.net> Reply-To: NeilBrown Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: NeilBrown efivarfs() is one of the few remaining users of d_alloc(). Other similar filesystems use d_alloc_name() in the same circumstances. Now that d_alloc_name() supports ->d_hash (providing that it never fails), change efivarfs to use that. Signed-off-by: NeilBrown --- fs/efivarfs/super.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index 1c5224cf183e..232d9757804c 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -189,26 +189,6 @@ static const struct dentry_operations efivarfs_d_ops = =3D { .d_hash =3D efivarfs_d_hash, }; =20 -static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *n= ame) -{ - struct dentry *d; - struct qstr q; - int err; - - q.name =3D name; - q.len =3D strlen(name); - - err =3D efivarfs_d_hash(parent, &q); - if (err) - return ERR_PTR(err); - - d =3D d_alloc(parent, &q); - if (d) - return d; - - return ERR_PTR(-ENOMEM); -} - bool efivarfs_variable_is_present(efi_char16_t *variable_name, efi_guid_t *vendor, void *data) { @@ -263,9 +243,9 @@ static int efivarfs_create_dentry(struct super_block *s= b, efi_char16_t *name16, memcpy(entry->var.VariableName, name16, name_size); memcpy(&(entry->var.VendorGuid), &vendor, sizeof(efi_guid_t)); =20 - dentry =3D efivarfs_alloc_dentry(root, name); - if (IS_ERR(dentry)) { - err =3D PTR_ERR(dentry); + dentry =3D d_alloc_name(root, name); + if (!dentry) { + err =3D -ENOMEM; goto fail_inode; } =20 --=20 2.50.0.107.gf914562f5916.dirty