mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
VFS: improve interface for lookup_one functions
The family of functions: lookup_one() lookup_one_unlocked() lookup_one_positive_unlocked() appear designed to be used by external clients of the filesystem rather than by filesystems acting on themselves as the lookup_one_len family are used. They are used by: btrfs/ioctl - which is a user-space interface rather than an internal activity exportfs - i.e. from nfsd or the open_by_handle_at interface overlayfs - at access the underlying filesystems smb/server - for file service They should be used by nfsd (more than just the exportfs path) and cachefs but aren't. It would help if the documentation didn't claim they should "not be called by generic code". Also the path component name is passed as "name" and "len" which are (confusingly?) separate by the "base". In some cases the len in simply "strlen" and so passing a qstr using QSTR() would make the calling clearer. Other callers do pass separate name and len which are stored in a struct. Sometimes these are already stored in a qstr, other times it easily could be. So this patch changes these three functions to receive a 'struct qstr *', and improves the documentation. QSTR_LEN() is added to make it easy to pass a QSTR containing a known len. [brauner@kernel.org: take a struct qstr pointer] Signed-off-by: NeilBrown <neil@brown.name> Link: https://lore.kernel.org/r/20250319031545.2999807-2-neil@brown.name Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
0af2f6be1b
commit
5741909697
10 changed files with 58 additions and 58 deletions
|
@ -1203,3 +1203,12 @@ should use d_drop();d_splice_alias() and return the result of the latter.
|
||||||
If a positive dentry cannot be returned for some reason, in-kernel
|
If a positive dentry cannot be returned for some reason, in-kernel
|
||||||
clients such as cachefiles, nfsd, smb/server may not perform ideally but
|
clients such as cachefiles, nfsd, smb/server may not perform ideally but
|
||||||
will fail-safe.
|
will fail-safe.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
** mandatory**
|
||||||
|
|
||||||
|
lookup_one(), lookup_one_unlocked(), lookup_one_positive_unlocked() now
|
||||||
|
take a qstr instead of a name and len. These, not the "one_len"
|
||||||
|
versions, should be used whenever accessing a filesystem from outside
|
||||||
|
that filesysmtem, through a mount point - which will have a mnt_idmap.
|
||||||
|
|
|
@ -909,7 +909,7 @@ static noinline int btrfs_mksubvol(const struct path *parent,
|
||||||
if (error == -EINTR)
|
if (error == -EINTR)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
dentry = lookup_one(idmap, name, parent->dentry, namelen);
|
dentry = lookup_one(idmap, &QSTR_LEN(name, namelen), parent->dentry);
|
||||||
error = PTR_ERR(dentry);
|
error = PTR_ERR(dentry);
|
||||||
if (IS_ERR(dentry))
|
if (IS_ERR(dentry))
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
@ -2288,7 +2288,6 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
||||||
struct btrfs_ioctl_vol_args_v2 *vol_args2 = NULL;
|
struct btrfs_ioctl_vol_args_v2 *vol_args2 = NULL;
|
||||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||||
char *subvol_name, *subvol_name_ptr = NULL;
|
char *subvol_name, *subvol_name_ptr = NULL;
|
||||||
int subvol_namelen;
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool destroy_parent = false;
|
bool destroy_parent = false;
|
||||||
|
|
||||||
|
@ -2411,10 +2410,8 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
subvol_namelen = strlen(subvol_name);
|
|
||||||
|
|
||||||
if (strchr(subvol_name, '/') ||
|
if (strchr(subvol_name, '/') ||
|
||||||
strncmp(subvol_name, "..", subvol_namelen) == 0) {
|
strcmp(subvol_name, "..") == 0) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto free_subvol_name;
|
goto free_subvol_name;
|
||||||
}
|
}
|
||||||
|
@ -2427,7 +2424,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
||||||
ret = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT);
|
ret = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT);
|
||||||
if (ret == -EINTR)
|
if (ret == -EINTR)
|
||||||
goto free_subvol_name;
|
goto free_subvol_name;
|
||||||
dentry = lookup_one(idmap, subvol_name, parent, subvol_namelen);
|
dentry = lookup_one(idmap, &QSTR(subvol_name), parent);
|
||||||
if (IS_ERR(dentry)) {
|
if (IS_ERR(dentry)) {
|
||||||
ret = PTR_ERR(dentry);
|
ret = PTR_ERR(dentry);
|
||||||
goto out_unlock_dir;
|
goto out_unlock_dir;
|
||||||
|
|
|
@ -143,7 +143,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt,
|
||||||
if (err)
|
if (err)
|
||||||
goto out_err;
|
goto out_err;
|
||||||
dprintk("%s: found name: %s\n", __func__, nbuf);
|
dprintk("%s: found name: %s\n", __func__, nbuf);
|
||||||
tmp = lookup_one_unlocked(mnt_idmap(mnt), nbuf, parent, strlen(nbuf));
|
tmp = lookup_one_unlocked(mnt_idmap(mnt), &QSTR(nbuf), parent);
|
||||||
if (IS_ERR(tmp)) {
|
if (IS_ERR(tmp)) {
|
||||||
dprintk("lookup failed: %ld\n", PTR_ERR(tmp));
|
dprintk("lookup failed: %ld\n", PTR_ERR(tmp));
|
||||||
err = PTR_ERR(tmp);
|
err = PTR_ERR(tmp);
|
||||||
|
@ -549,8 +549,7 @@ exportfs_decode_fh_raw(struct vfsmount *mnt, struct fid *fid, int fh_len,
|
||||||
}
|
}
|
||||||
|
|
||||||
inode_lock(target_dir->d_inode);
|
inode_lock(target_dir->d_inode);
|
||||||
nresult = lookup_one(mnt_idmap(mnt), nbuf,
|
nresult = lookup_one(mnt_idmap(mnt), &QSTR(nbuf), target_dir);
|
||||||
target_dir, strlen(nbuf));
|
|
||||||
if (!IS_ERR(nresult)) {
|
if (!IS_ERR(nresult)) {
|
||||||
if (unlikely(nresult->d_inode != result->d_inode)) {
|
if (unlikely(nresult->d_inode != result->d_inode)) {
|
||||||
dput(nresult);
|
dput(nresult);
|
||||||
|
|
51
fs/namei.c
51
fs/namei.c
|
@ -2922,19 +2922,17 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
|
||||||
EXPORT_SYMBOL(lookup_one_len);
|
EXPORT_SYMBOL(lookup_one_len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lookup_one - filesystem helper to lookup single pathname component
|
* lookup_one - lookup single pathname component
|
||||||
* @idmap: idmap of the mount the lookup is performed from
|
* @idmap: idmap of the mount the lookup is performed from
|
||||||
* @name: pathname component to lookup
|
* @name: qstr holding pathname component to lookup
|
||||||
* @base: base directory to lookup from
|
* @base: base directory to lookup from
|
||||||
* @len: maximum length @len should be interpreted to
|
|
||||||
*
|
*
|
||||||
* Note that this routine is purely a helper for filesystem usage and should
|
* This can be used for in-kernel filesystem clients such as file servers.
|
||||||
* not be called by generic code.
|
|
||||||
*
|
*
|
||||||
* The caller must hold base->i_mutex.
|
* The caller must hold base->i_mutex.
|
||||||
*/
|
*/
|
||||||
struct dentry *lookup_one(struct mnt_idmap *idmap, const char *name,
|
struct dentry *lookup_one(struct mnt_idmap *idmap, struct qstr *name,
|
||||||
struct dentry *base, int len)
|
struct dentry *base)
|
||||||
{
|
{
|
||||||
struct dentry *dentry;
|
struct dentry *dentry;
|
||||||
struct qstr this;
|
struct qstr this;
|
||||||
|
@ -2942,7 +2940,7 @@ struct dentry *lookup_one(struct mnt_idmap *idmap, const char *name,
|
||||||
|
|
||||||
WARN_ON_ONCE(!inode_is_locked(base->d_inode));
|
WARN_ON_ONCE(!inode_is_locked(base->d_inode));
|
||||||
|
|
||||||
err = lookup_one_common(idmap, name, base, len, &this);
|
err = lookup_one_common(idmap, name->name, base, name->len, &this);
|
||||||
if (err)
|
if (err)
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
|
|
||||||
|
@ -2952,27 +2950,24 @@ struct dentry *lookup_one(struct mnt_idmap *idmap, const char *name,
|
||||||
EXPORT_SYMBOL(lookup_one);
|
EXPORT_SYMBOL(lookup_one);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lookup_one_unlocked - filesystem helper to lookup single pathname component
|
* lookup_one_unlocked - lookup single pathname component
|
||||||
* @idmap: idmap of the mount the lookup is performed from
|
* @idmap: idmap of the mount the lookup is performed from
|
||||||
* @name: pathname component to lookup
|
* @name: qstr olding pathname component to lookup
|
||||||
* @base: base directory to lookup from
|
* @base: base directory to lookup from
|
||||||
* @len: maximum length @len should be interpreted to
|
|
||||||
*
|
*
|
||||||
* Note that this routine is purely a helper for filesystem usage and should
|
* This can be used for in-kernel filesystem clients such as file servers.
|
||||||
* not be called by generic code.
|
|
||||||
*
|
*
|
||||||
* Unlike lookup_one_len, it should be called without the parent
|
* Unlike lookup_one_len, it should be called without the parent
|
||||||
* i_mutex held, and will take the i_mutex itself if necessary.
|
* i_rwsem held, and will take the i_rwsem itself if necessary.
|
||||||
*/
|
*/
|
||||||
struct dentry *lookup_one_unlocked(struct mnt_idmap *idmap,
|
struct dentry *lookup_one_unlocked(struct mnt_idmap *idmap,
|
||||||
const char *name, struct dentry *base,
|
struct qstr *name, struct dentry *base)
|
||||||
int len)
|
|
||||||
{
|
{
|
||||||
struct qstr this;
|
struct qstr this;
|
||||||
int err;
|
int err;
|
||||||
struct dentry *ret;
|
struct dentry *ret;
|
||||||
|
|
||||||
err = lookup_one_common(idmap, name, base, len, &this);
|
err = lookup_one_common(idmap, name->name, base, name->len, &this);
|
||||||
if (err)
|
if (err)
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
|
|
||||||
|
@ -2984,12 +2979,10 @@ struct dentry *lookup_one_unlocked(struct mnt_idmap *idmap,
|
||||||
EXPORT_SYMBOL(lookup_one_unlocked);
|
EXPORT_SYMBOL(lookup_one_unlocked);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lookup_one_positive_unlocked - filesystem helper to lookup single
|
* lookup_one_positive_unlocked - lookup single pathname component
|
||||||
* pathname component
|
|
||||||
* @idmap: idmap of the mount the lookup is performed from
|
* @idmap: idmap of the mount the lookup is performed from
|
||||||
* @name: pathname component to lookup
|
* @name: qstr holding pathname component to lookup
|
||||||
* @base: base directory to lookup from
|
* @base: base directory to lookup from
|
||||||
* @len: maximum length @len should be interpreted to
|
|
||||||
*
|
*
|
||||||
* This helper will yield ERR_PTR(-ENOENT) on negatives. The helper returns
|
* This helper will yield ERR_PTR(-ENOENT) on negatives. The helper returns
|
||||||
* known positive or ERR_PTR(). This is what most of the users want.
|
* known positive or ERR_PTR(). This is what most of the users want.
|
||||||
|
@ -2998,16 +2991,15 @@ EXPORT_SYMBOL(lookup_one_unlocked);
|
||||||
* time, so callers of lookup_one_unlocked() need to be very careful; pinned
|
* time, so callers of lookup_one_unlocked() need to be very careful; pinned
|
||||||
* positives have >d_inode stable, so this one avoids such problems.
|
* positives have >d_inode stable, so this one avoids such problems.
|
||||||
*
|
*
|
||||||
* Note that this routine is purely a helper for filesystem usage and should
|
* This can be used for in-kernel filesystem clients such as file servers.
|
||||||
* not be called by generic code.
|
|
||||||
*
|
*
|
||||||
* The helper should be called without i_mutex held.
|
* The helper should be called without i_rwsem held.
|
||||||
*/
|
*/
|
||||||
struct dentry *lookup_one_positive_unlocked(struct mnt_idmap *idmap,
|
struct dentry *lookup_one_positive_unlocked(struct mnt_idmap *idmap,
|
||||||
const char *name,
|
struct qstr *name,
|
||||||
struct dentry *base, int len)
|
struct dentry *base)
|
||||||
{
|
{
|
||||||
struct dentry *ret = lookup_one_unlocked(idmap, name, base, len);
|
struct dentry *ret = lookup_one_unlocked(idmap, name, base);
|
||||||
|
|
||||||
if (!IS_ERR(ret) && d_flags_negative(smp_load_acquire(&ret->d_flags))) {
|
if (!IS_ERR(ret) && d_flags_negative(smp_load_acquire(&ret->d_flags))) {
|
||||||
dput(ret);
|
dput(ret);
|
||||||
|
@ -3032,7 +3024,7 @@ EXPORT_SYMBOL(lookup_one_positive_unlocked);
|
||||||
struct dentry *lookup_one_len_unlocked(const char *name,
|
struct dentry *lookup_one_len_unlocked(const char *name,
|
||||||
struct dentry *base, int len)
|
struct dentry *base, int len)
|
||||||
{
|
{
|
||||||
return lookup_one_unlocked(&nop_mnt_idmap, name, base, len);
|
return lookup_one_unlocked(&nop_mnt_idmap, &QSTR_LEN(name, len), base);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(lookup_one_len_unlocked);
|
EXPORT_SYMBOL(lookup_one_len_unlocked);
|
||||||
|
|
||||||
|
@ -3047,7 +3039,8 @@ EXPORT_SYMBOL(lookup_one_len_unlocked);
|
||||||
struct dentry *lookup_positive_unlocked(const char *name,
|
struct dentry *lookup_positive_unlocked(const char *name,
|
||||||
struct dentry *base, int len)
|
struct dentry *base, int len)
|
||||||
{
|
{
|
||||||
return lookup_one_positive_unlocked(&nop_mnt_idmap, name, base, len);
|
return lookup_one_positive_unlocked(&nop_mnt_idmap,
|
||||||
|
&QSTR_LEN(name, len), base);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(lookup_positive_unlocked);
|
EXPORT_SYMBOL(lookup_positive_unlocked);
|
||||||
|
|
||||||
|
|
|
@ -205,8 +205,8 @@ static struct dentry *ovl_lookup_positive_unlocked(struct ovl_lookup_data *d,
|
||||||
struct dentry *base, int len,
|
struct dentry *base, int len,
|
||||||
bool drop_negative)
|
bool drop_negative)
|
||||||
{
|
{
|
||||||
struct dentry *ret = lookup_one_unlocked(mnt_idmap(d->layer->mnt), name,
|
struct dentry *ret = lookup_one_unlocked(mnt_idmap(d->layer->mnt),
|
||||||
base, len);
|
&QSTR_LEN(name, len), base);
|
||||||
|
|
||||||
if (!IS_ERR(ret) && d_flags_negative(smp_load_acquire(&ret->d_flags))) {
|
if (!IS_ERR(ret) && d_flags_negative(smp_load_acquire(&ret->d_flags))) {
|
||||||
if (drop_negative && ret->d_lockref.count == 1) {
|
if (drop_negative && ret->d_lockref.count == 1) {
|
||||||
|
@ -789,8 +789,8 @@ struct dentry *ovl_lookup_index(struct ovl_fs *ofs, struct dentry *upper,
|
||||||
if (err)
|
if (err)
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
|
|
||||||
index = lookup_one_positive_unlocked(ovl_upper_mnt_idmap(ofs), name.name,
|
index = lookup_one_positive_unlocked(ovl_upper_mnt_idmap(ofs), &name,
|
||||||
ofs->workdir, name.len);
|
ofs->workdir);
|
||||||
if (IS_ERR(index)) {
|
if (IS_ERR(index)) {
|
||||||
err = PTR_ERR(index);
|
err = PTR_ERR(index);
|
||||||
if (err == -ENOENT) {
|
if (err == -ENOENT) {
|
||||||
|
@ -1371,7 +1371,7 @@ out:
|
||||||
bool ovl_lower_positive(struct dentry *dentry)
|
bool ovl_lower_positive(struct dentry *dentry)
|
||||||
{
|
{
|
||||||
struct ovl_entry *poe = OVL_E(dentry->d_parent);
|
struct ovl_entry *poe = OVL_E(dentry->d_parent);
|
||||||
const struct qstr *name = &dentry->d_name;
|
struct qstr *name = &dentry->d_name;
|
||||||
const struct cred *old_cred;
|
const struct cred *old_cred;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
bool positive = false;
|
bool positive = false;
|
||||||
|
@ -1396,7 +1396,7 @@ bool ovl_lower_positive(struct dentry *dentry)
|
||||||
|
|
||||||
this = lookup_one_positive_unlocked(
|
this = lookup_one_positive_unlocked(
|
||||||
mnt_idmap(parentpath->layer->mnt),
|
mnt_idmap(parentpath->layer->mnt),
|
||||||
name->name, parentpath->dentry, name->len);
|
name, parentpath->dentry);
|
||||||
if (IS_ERR(this)) {
|
if (IS_ERR(this)) {
|
||||||
switch (PTR_ERR(this)) {
|
switch (PTR_ERR(this)) {
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
|
|
@ -402,7 +402,7 @@ static inline struct dentry *ovl_lookup_upper(struct ovl_fs *ofs,
|
||||||
const char *name,
|
const char *name,
|
||||||
struct dentry *base, int len)
|
struct dentry *base, int len)
|
||||||
{
|
{
|
||||||
return lookup_one(ovl_upper_mnt_idmap(ofs), name, base, len);
|
return lookup_one(ovl_upper_mnt_idmap(ofs), &QSTR_LEN(name, len), base);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool ovl_open_flags_need_copy_up(int flags)
|
static inline bool ovl_open_flags_need_copy_up(int flags)
|
||||||
|
|
|
@ -271,7 +271,6 @@ static bool ovl_fill_merge(struct dir_context *ctx, const char *name,
|
||||||
static int ovl_check_whiteouts(const struct path *path, struct ovl_readdir_data *rdd)
|
static int ovl_check_whiteouts(const struct path *path, struct ovl_readdir_data *rdd)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct ovl_cache_entry *p;
|
|
||||||
struct dentry *dentry, *dir = path->dentry;
|
struct dentry *dentry, *dir = path->dentry;
|
||||||
const struct cred *old_cred;
|
const struct cred *old_cred;
|
||||||
|
|
||||||
|
@ -280,9 +279,11 @@ static int ovl_check_whiteouts(const struct path *path, struct ovl_readdir_data
|
||||||
err = down_write_killable(&dir->d_inode->i_rwsem);
|
err = down_write_killable(&dir->d_inode->i_rwsem);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
while (rdd->first_maybe_whiteout) {
|
while (rdd->first_maybe_whiteout) {
|
||||||
p = rdd->first_maybe_whiteout;
|
struct ovl_cache_entry *p =
|
||||||
|
rdd->first_maybe_whiteout;
|
||||||
rdd->first_maybe_whiteout = p->next_maybe_whiteout;
|
rdd->first_maybe_whiteout = p->next_maybe_whiteout;
|
||||||
dentry = lookup_one(mnt_idmap(path->mnt), p->name, dir, p->len);
|
dentry = lookup_one(mnt_idmap(path->mnt),
|
||||||
|
&QSTR_LEN(p->name, p->len), dir);
|
||||||
if (!IS_ERR(dentry)) {
|
if (!IS_ERR(dentry)) {
|
||||||
p->is_whiteout = ovl_is_whiteout(dentry);
|
p->is_whiteout = ovl_is_whiteout(dentry);
|
||||||
dput(dentry);
|
dput(dentry);
|
||||||
|
@ -492,7 +493,7 @@ static int ovl_cache_update(const struct path *path, struct ovl_cache_entry *p,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* This checks also for xwhiteouts */
|
/* This checks also for xwhiteouts */
|
||||||
this = lookup_one(mnt_idmap(path->mnt), p->name, dir, p->len);
|
this = lookup_one(mnt_idmap(path->mnt), &QSTR_LEN(p->name, p->len), dir);
|
||||||
if (IS_ERR_OR_NULL(this) || !this->d_inode) {
|
if (IS_ERR_OR_NULL(this) || !this->d_inode) {
|
||||||
/* Mark a stale entry */
|
/* Mark a stale entry */
|
||||||
p->is_whiteout = true;
|
p->is_whiteout = true;
|
||||||
|
|
|
@ -4117,9 +4117,10 @@ static int process_query_dir_entries(struct smb2_query_dir_private *priv)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
lock_dir(priv->dir_fp);
|
lock_dir(priv->dir_fp);
|
||||||
dent = lookup_one(idmap, priv->d_info->name,
|
dent = lookup_one(idmap,
|
||||||
priv->dir_fp->filp->f_path.dentry,
|
&QSTR_LEN(priv->d_info->name,
|
||||||
priv->d_info->name_len);
|
priv->d_info->name_len),
|
||||||
|
priv->dir_fp->filp->f_path.dentry);
|
||||||
unlock_dir(priv->dir_fp);
|
unlock_dir(priv->dir_fp);
|
||||||
|
|
||||||
if (IS_ERR(dent)) {
|
if (IS_ERR(dent)) {
|
||||||
|
|
|
@ -57,7 +57,8 @@ struct qstr {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QSTR_INIT(n,l) { { { .len = l } }, .name = n }
|
#define QSTR_INIT(n,l) { { { .len = l } }, .name = n }
|
||||||
#define QSTR(n) (struct qstr)QSTR_INIT(n, strlen(n))
|
#define QSTR_LEN(n,l) (struct qstr)QSTR_INIT(n,l)
|
||||||
|
#define QSTR(n) QSTR_LEN(n, strlen(n))
|
||||||
|
|
||||||
extern const struct qstr empty_name;
|
extern const struct qstr empty_name;
|
||||||
extern const struct qstr slash_name;
|
extern const struct qstr slash_name;
|
||||||
|
|
|
@ -73,13 +73,12 @@ extern struct dentry *try_lookup_one_len(const char *, struct dentry *, int);
|
||||||
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
|
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
|
||||||
extern struct dentry *lookup_one_len_unlocked(const char *, struct dentry *, int);
|
extern struct dentry *lookup_one_len_unlocked(const char *, struct dentry *, int);
|
||||||
extern struct dentry *lookup_positive_unlocked(const char *, struct dentry *, int);
|
extern struct dentry *lookup_positive_unlocked(const char *, struct dentry *, int);
|
||||||
struct dentry *lookup_one(struct mnt_idmap *, const char *, struct dentry *, int);
|
struct dentry *lookup_one(struct mnt_idmap *, struct qstr *, struct dentry *);
|
||||||
struct dentry *lookup_one_unlocked(struct mnt_idmap *idmap,
|
struct dentry *lookup_one_unlocked(struct mnt_idmap *idmap,
|
||||||
const char *name, struct dentry *base,
|
struct qstr *name, struct dentry *base);
|
||||||
int len);
|
|
||||||
struct dentry *lookup_one_positive_unlocked(struct mnt_idmap *idmap,
|
struct dentry *lookup_one_positive_unlocked(struct mnt_idmap *idmap,
|
||||||
const char *name,
|
struct qstr *name,
|
||||||
struct dentry *base, int len);
|
struct dentry *base);
|
||||||
|
|
||||||
extern int follow_down_one(struct path *);
|
extern int follow_down_one(struct path *);
|
||||||
extern int follow_down(struct path *path, unsigned int flags);
|
extern int follow_down(struct path *path, unsigned int flags);
|
||||||
|
|
Loading…
Add table
Reference in a new issue