From nobody Tue Apr 7 16:17:36 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 47B042BCF5D; Thu, 12 Mar 2026 21:57:57 +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=1773352678; cv=none; b=qBIltq5UX5vO9nZOn2gmYzGn/ReD2cgw59u4Vw4fHcA8+hZay8I4EYmlokrZ/2mLspp+/h7Ykkz34K1j+Y3HXMAlPu7uUg7adk2iVtwBaGZMpCqYscjIP8YBZwNmobTjHFPIaKG13Snn4JUKdY73PqK+fm6uN7k+0rv7UhKo/Yw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773352678; c=relaxed/simple; bh=zhOU+CUP9BDiz+mBL+6rvvcpWUBlfL5f4sGMgdReybg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d0kjDlRtdbszzPn1/xSM1cebsxNm22qesVOsVqmakIKi2BnyPXHDAeCbgWdUGsbLz42tcMiMirfv8pPb0H+kacIGCGH7Pi8rTmcd+zhILhBTbsmryMG42kkCHMY/W1x0zTuQfkQROsSafkgDPHFmvBQqPGcmDlqG2KL0qEXIXzk= 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=OmN1n9vT; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DUkArunM; 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="OmN1n9vT"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DUkArunM" Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailflow.stl.internal (Postfix) with ESMTP id 9E9601300F6C; Thu, 12 Mar 2026 17:57:55 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Thu, 12 Mar 2026 17:57:56 -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=1773352675; x=1773359875; bh=tG1sAZ33EfRbToxRaM5utlCqwlH2sGHBZL6Q+fSZ/kg=; b= OmN1n9vTcFKpHoHUGImFy0CQZvz9KEtReJX8p0OX7kUzjl9V1nlaH0yIJxxNJ5o5 oET4VMjoMdSHj7IP5T4w/Rg6YRHXE0F+yv/zv6JIVNaEu04OcGt8i2Z31ixKUARE DgWSGk08+PgsvbboVZfumYegJ49ceyganU4rmEo80NNQt8dBC4CP9Wg3fGyUFm/H JqPNMalfP80ve+bbpg9QT7R10mOUfPal3L+Ic8nXjpuv3ShR8ZVXFaW54uMweLe0 Uq9Qii9ZXDmV3HkZ8LfHyMvZo42uRI7668NHYPRCfw63wFbH2Rx07hB+CGfTU/+0 5h1RkHy0wyR2U7RjIeMU+g== 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=1773352675; x=1773359875; bh=t G1sAZ33EfRbToxRaM5utlCqwlH2sGHBZL6Q+fSZ/kg=; b=DUkArunM0luViPOSC jYYHJCnZBtZFu1yArXIwY0hvu6BErdZBDdHUc16HB0A4qYJKkcPzwpLxrDs9bVos bzYgAA+8UttTRhFKZ0bpoi8CaHHQoxiV1ip3XmTGLLS3OhflYcg/lSPRa3aw9Esw 9Dby830jyY6S1LECOhApUa2X7BsIoOuRyilaw6sD+gyYb3+jHWgRcHxC9iAw/Z2u IRdPeUpUN5OYAHfWgBBL/r028pjWmk4Ha2AjbAGHczLxiNwGIUOrONuduvNIGDUf DAhRMe7hKq4+w9i2cCgr2MKWCq0AYV+anj+y7k2zwww+ByYy121ZFJq9XFjo8x6e Ofj3w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvkeejledvucetufdoteggodetrf 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:57:42 -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 50/53] VFS: remove lookup_one() and lookup_noperm() Date: Fri, 13 Mar 2026 08:12:37 +1100 Message-ID: <20260312214330.3885211-51-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 These are no longer used, so remove them. Signed-off-by: NeilBrown --- Documentation/filesystems/porting.rst | 7 +++ fs/ecryptfs/inode.c | 2 +- fs/namei.c | 61 ++------------------------- include/linux/namei.h | 2 - 4 files changed, 12 insertions(+), 60 deletions(-) diff --git a/Documentation/filesystems/porting.rst b/Documentation/filesyst= ems/porting.rst index 154a38cd7801..7e83bd3c5a12 100644 --- a/Documentation/filesystems/porting.rst +++ b/Documentation/filesystems/porting.rst @@ -1396,3 +1396,10 @@ and d_alloc_parallel() or d_alloc_noblock() when sta= ndard interfaces can be used d_rehash() is gone. It should never be needed. Only unhash a dentry if you really don't want it. =20 +--- + +** mandatory** + +lookup_one() and lookup_noperm() are no longer available. Use +start_creating() or similar instead. + diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index beb9e2c8b8b3..a7a596d51d67 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -414,7 +414,7 @@ static struct dentry *ecryptfs_lookup(struct inode *ecr= yptfs_dir_inode, =20 lower_dentry =3D lookup_noperm_unlocked(&qname, lower_dir_dentry); if (IS_ERR(lower_dentry)) { - ecryptfs_printk(KERN_DEBUG, "%s: lookup_noperm() returned " + ecryptfs_printk(KERN_DEBUG, "%s: lookup_noperm_unlocked() returned " "[%ld] on lower_dentry =3D [%s]\n", __func__, PTR_ERR(lower_dentry), qname.name); diff --git a/fs/namei.c b/fs/namei.c index eed388ee8a30..cb80490a869f 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3148,59 +3148,6 @@ struct dentry *try_lookup_noperm(struct qstr *name, = struct dentry *base) } EXPORT_SYMBOL(try_lookup_noperm); =20 -/** - * lookup_noperm - filesystem helper to lookup single pathname component - * @name: qstr storing pathname component to lookup - * @base: base directory to lookup from - * - * Note that this routine is purely a helper for filesystem usage and shou= ld - * not be called by generic code. It does no permission checking. - * - * The caller must hold base->i_rwsem. - */ -struct dentry *lookup_noperm(struct qstr *name, struct dentry *base) -{ - struct dentry *dentry; - int err; - - WARN_ON_ONCE(!inode_is_locked(base->d_inode)); - - err =3D lookup_noperm_common(name, base); - if (err) - return ERR_PTR(err); - - dentry =3D lookup_dcache(name, base, 0); - return dentry ? dentry : __lookup_slow(name, base, 0); -} -EXPORT_SYMBOL(lookup_noperm); - -/** - * lookup_one - lookup single pathname component - * @idmap: idmap of the mount the lookup is performed from - * @name: qstr holding pathname component to lookup - * @base: base directory to lookup from - * - * This can be used for in-kernel filesystem clients such as file servers. - * - * The caller must hold base->i_rwsem. - */ -struct dentry *lookup_one(struct mnt_idmap *idmap, struct qstr *name, - struct dentry *base) -{ - struct dentry *dentry; - int err; - - WARN_ON_ONCE(!inode_is_locked(base->d_inode)); - - err =3D lookup_one_common(idmap, name, base); - if (err) - return ERR_PTR(err); - - dentry =3D lookup_dcache(name, base, 0); - return dentry ? dentry : __lookup_slow(name, base, 0); -} -EXPORT_SYMBOL(lookup_one); - /** * lookup_one_unlocked - lookup single pathname component * @idmap: idmap of the mount the lookup is performed from @@ -3209,8 +3156,8 @@ EXPORT_SYMBOL(lookup_one); * * This can be used for in-kernel filesystem clients such as file servers. * - * Unlike lookup_one, it should be called without the parent - * i_rwsem held, and will take the i_rwsem itself if necessary. + * It should be called without the parent i_rwsem held, and will take + * the i_rwsem itself if necessary. * * Returns: - A dentry, possibly negative, or * - same errors as try_lookup_noperm() or @@ -3322,8 +3269,8 @@ EXPORT_SYMBOL(lookup_one_positive_unlocked); * Note that this routine is purely a helper for filesystem usage and shou= ld * not be called by generic code. It does no permission checking. * - * Unlike lookup_noperm(), it should be called without the parent - * i_rwsem held, and will take the i_rwsem itself if necessary. + * This should be called without the parent i_rwsem held, and will take + * the i_rwsem itself if necessary. * * Unlike try_lookup_noperm() it *does* revalidate the dentry if it already * existed. diff --git a/include/linux/namei.h b/include/linux/namei.h index b3346a513d8f..cb79e84c718d 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -74,10 +74,8 @@ int vfs_path_lookup(struct dentry *, struct vfsmount *, = const char *, unsigned int, struct path *); =20 extern struct dentry *try_lookup_noperm(struct qstr *, struct dentry *); -extern struct dentry *lookup_noperm(struct qstr *, struct dentry *); extern struct dentry *lookup_noperm_unlocked(struct qstr *, struct dentry = *); extern struct dentry *lookup_noperm_positive_unlocked(struct qstr *, struc= t dentry *); -struct dentry *lookup_one(struct mnt_idmap *, struct qstr *, struct dentry= *); struct dentry *lookup_one_unlocked(struct mnt_idmap *idmap, struct qstr *name, struct dentry *base); struct dentry *lookup_one_positive_unlocked(struct mnt_idmap *idmap, --=20 2.50.0.107.gf914562f5916.dirty