fs: fold __start_removing_path into start_removing_path

Only one caller left, and simplified this way.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260511072239.2456725-4-hch@lst.de
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Christoph Hellwig
2026-05-11 09:22:30 +02:00
committed by Christian Brauner
parent e6666aef11
commit 5d833d8ba5

View File

@@ -2955,15 +2955,16 @@ void end_dirop(struct dentry *de)
EXPORT_SYMBOL(end_dirop);
/* does lookup, returns the object with parent locked */
static struct dentry *__start_removing_path(int dfd, struct filename *name,
struct path *path)
struct dentry *start_removing_path(const char *name, struct path *path)
{
CLASS(filename_kernel, filename)(name);
struct path parent_path __free(path_put) = {};
struct dentry *d;
struct qstr last;
int type, error;
error = filename_parentat(dfd, name, 0, &parent_path, &last, &type);
error = filename_parentat(AT_FDCWD, filename, 0, &parent_path, &last,
&type);
if (error)
return ERR_PTR(error);
if (unlikely(type != LAST_NORM))
@@ -3023,12 +3024,6 @@ struct dentry *kern_path_parent(const char *name, struct path *path)
return d;
}
struct dentry *start_removing_path(const char *name, struct path *path)
{
CLASS(filename_kernel, filename)(name);
return __start_removing_path(AT_FDCWD, filename, path);
}
int kern_path(const char *name, unsigned int flags, struct path *path)
{
CLASS(filename_kernel, filename)(name);