On Wed, 2026-02-04 at 15:57 +1100, NeilBrown wrote: > From: NeilBrown <[email protected]> > > lookup_one_qstr_excl() is no longer used outside of namei.c, so > make it static. > > Signed-off-by: NeilBrown <[email protected]> > --- > Documentation/filesystems/porting.rst | 7 +++++++ > fs/namei.c | 5 ++--- > include/linux/namei.h | 3 --- > 3 files changed, 9 insertions(+), 6 deletions(-) > > diff --git a/Documentation/filesystems/porting.rst > b/Documentation/filesystems/porting.rst > index ed3ac56e3c76..ed86c95d9d01 100644 > --- a/Documentation/filesystems/porting.rst > +++ b/Documentation/filesystems/porting.rst > @@ -1340,3 +1340,10 @@ The ->setlease() file_operation must now be explicitly > set in order to provide > support for leases. When set to NULL, the kernel will now return -EINVAL to > attempts to set a lease. Filesystems that wish to use the kernel-internal > lease > implementation should set it to generic_setlease(). > + > +--- > + > +**mandatory** > + > +lookup_one_qstr_excl() is no longer exported - use start_creating() or > +similar. > diff --git a/fs/namei.c b/fs/namei.c > index 40af78ddfb1b..307b4d0866b8 100644 > --- a/fs/namei.c > +++ b/fs/namei.c > @@ -1730,8 +1730,8 @@ static struct dentry *lookup_dcache(const struct qstr > *name, > * Will return -ENOENT if name isn't found and LOOKUP_CREATE wasn't passed. > * Will return -EEXIST if name is found and LOOKUP_EXCL was passed. > */ > -struct dentry *lookup_one_qstr_excl(const struct qstr *name, > - struct dentry *base, unsigned int flags) > +static struct dentry *lookup_one_qstr_excl(const struct qstr *name, > + struct dentry *base, unsigned int > flags) > { > struct dentry *dentry; > struct dentry *old; > @@ -1768,7 +1768,6 @@ struct dentry *lookup_one_qstr_excl(const struct qstr > *name, > } > return dentry; > } > -EXPORT_SYMBOL(lookup_one_qstr_excl); > > /** > * lookup_fast - do fast lockless (but racy) lookup of a dentry > diff --git a/include/linux/namei.h b/include/linux/namei.h > index 58600cf234bc..c7a7288cdd25 100644 > --- a/include/linux/namei.h > +++ b/include/linux/namei.h > @@ -54,9 +54,6 @@ extern int path_pts(struct path *path); > > extern int user_path_at(int, const char __user *, unsigned, struct path *); > > -struct dentry *lookup_one_qstr_excl(const struct qstr *name, > - struct dentry *base, > - unsigned int flags); > extern int kern_path(const char *, unsigned, struct path *); > struct dentry *kern_path_parent(const char *name, struct path *parent); >
Reviewed-by: Jeff Layton <[email protected]>
