mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
debugfs: rename end_creating() to debugfs_end_creating()
By not using the generic end_creating() name here we are free to use it more globally for a more generic function. This should have been done when start_creating() was renamed. For consistency, also rename failed_creating(). Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20251113002050.676694-2-neilb@ownmail.net Tested-by: syzbot@syzkaller.appspotmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
3a86608788
commit
8b45b9a882
@@ -403,7 +403,7 @@ static struct dentry *debugfs_start_creating(const char *name,
|
||||
return dentry;
|
||||
}
|
||||
|
||||
static struct dentry *failed_creating(struct dentry *dentry)
|
||||
static struct dentry *debugfs_failed_creating(struct dentry *dentry)
|
||||
{
|
||||
inode_unlock(d_inode(dentry->d_parent));
|
||||
dput(dentry);
|
||||
@@ -411,7 +411,7 @@ static struct dentry *failed_creating(struct dentry *dentry)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
static struct dentry *end_creating(struct dentry *dentry)
|
||||
static struct dentry *debugfs_end_creating(struct dentry *dentry)
|
||||
{
|
||||
inode_unlock(d_inode(dentry->d_parent));
|
||||
return dentry;
|
||||
@@ -435,7 +435,7 @@ static struct dentry *__debugfs_create_file(const char *name, umode_t mode,
|
||||
return dentry;
|
||||
|
||||
if (!(debugfs_allow & DEBUGFS_ALLOW_API)) {
|
||||
failed_creating(dentry);
|
||||
debugfs_failed_creating(dentry);
|
||||
return ERR_PTR(-EPERM);
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ static struct dentry *__debugfs_create_file(const char *name, umode_t mode,
|
||||
if (unlikely(!inode)) {
|
||||
pr_err("out of free dentries, can not create file '%s'\n",
|
||||
name);
|
||||
return failed_creating(dentry);
|
||||
return debugfs_failed_creating(dentry);
|
||||
}
|
||||
|
||||
inode->i_mode = mode;
|
||||
@@ -458,7 +458,7 @@ static struct dentry *__debugfs_create_file(const char *name, umode_t mode,
|
||||
|
||||
d_instantiate(dentry, inode);
|
||||
fsnotify_create(d_inode(dentry->d_parent), dentry);
|
||||
return end_creating(dentry);
|
||||
return debugfs_end_creating(dentry);
|
||||
}
|
||||
|
||||
struct dentry *debugfs_create_file_full(const char *name, umode_t mode,
|
||||
@@ -585,7 +585,7 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
|
||||
return dentry;
|
||||
|
||||
if (!(debugfs_allow & DEBUGFS_ALLOW_API)) {
|
||||
failed_creating(dentry);
|
||||
debugfs_failed_creating(dentry);
|
||||
return ERR_PTR(-EPERM);
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
|
||||
if (unlikely(!inode)) {
|
||||
pr_err("out of free dentries, can not create directory '%s'\n",
|
||||
name);
|
||||
return failed_creating(dentry);
|
||||
return debugfs_failed_creating(dentry);
|
||||
}
|
||||
|
||||
inode->i_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO;
|
||||
@@ -605,7 +605,7 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
|
||||
d_instantiate(dentry, inode);
|
||||
inc_nlink(d_inode(dentry->d_parent));
|
||||
fsnotify_mkdir(d_inode(dentry->d_parent), dentry);
|
||||
return end_creating(dentry);
|
||||
return debugfs_end_creating(dentry);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(debugfs_create_dir);
|
||||
|
||||
@@ -632,7 +632,7 @@ struct dentry *debugfs_create_automount(const char *name,
|
||||
return dentry;
|
||||
|
||||
if (!(debugfs_allow & DEBUGFS_ALLOW_API)) {
|
||||
failed_creating(dentry);
|
||||
debugfs_failed_creating(dentry);
|
||||
return ERR_PTR(-EPERM);
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ struct dentry *debugfs_create_automount(const char *name,
|
||||
if (unlikely(!inode)) {
|
||||
pr_err("out of free dentries, can not create automount '%s'\n",
|
||||
name);
|
||||
return failed_creating(dentry);
|
||||
return debugfs_failed_creating(dentry);
|
||||
}
|
||||
|
||||
make_empty_dir_inode(inode);
|
||||
@@ -652,7 +652,7 @@ struct dentry *debugfs_create_automount(const char *name,
|
||||
d_instantiate(dentry, inode);
|
||||
inc_nlink(d_inode(dentry->d_parent));
|
||||
fsnotify_mkdir(d_inode(dentry->d_parent), dentry);
|
||||
return end_creating(dentry);
|
||||
return debugfs_end_creating(dentry);
|
||||
}
|
||||
EXPORT_SYMBOL(debugfs_create_automount);
|
||||
|
||||
@@ -699,13 +699,13 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
|
||||
pr_err("out of free dentries, can not create symlink '%s'\n",
|
||||
name);
|
||||
kfree(link);
|
||||
return failed_creating(dentry);
|
||||
return debugfs_failed_creating(dentry);
|
||||
}
|
||||
inode->i_mode = S_IFLNK | S_IRWXUGO;
|
||||
inode->i_op = &debugfs_symlink_inode_operations;
|
||||
inode->i_link = link;
|
||||
d_instantiate(dentry, inode);
|
||||
return end_creating(dentry);
|
||||
return debugfs_end_creating(dentry);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(debugfs_create_symlink);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user