summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-01-25 20:15:18 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2015-01-25 22:52:51 +0100
commit02538a75ba176d286a421d1e41a66061f407c3b3 (patch)
treee19bbbb9acf863127f272f017a4a20c536905497 /fs
parentdebugfs_mknod(): get rid useless arguments (diff)
downloadlinux-02538a75ba176d286a421d1e41a66061f407c3b3.tar.xz
linux-02538a75ba176d286a421d1e41a66061f407c3b3.zip
fold debugfs_mkdir() into caller
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/debugfs/inode.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index bc02e2096977..8d12935c87f1 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -84,20 +84,6 @@ static int debugfs_mknod(struct dentry *dentry,
return 0;
}
-static int debugfs_mkdir(struct dentry *dentry, umode_t mode)
-{
- struct inode *dir = dentry->d_parent->d_inode;
- int res;
-
- mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR;
- res = debugfs_mknod(dentry, mode, NULL, NULL);
- if (!res) {
- inc_nlink(dir);
- fsnotify_mkdir(dir, dentry);
- }
- return res;
-}
-
static int debugfs_create(struct dentry *dentry, umode_t mode,
void *data, const struct file_operations *fops)
{
@@ -407,7 +393,12 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
if (IS_ERR(dentry))
return NULL;
- error = debugfs_mkdir(dentry, S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO);
+ error = debugfs_mknod(dentry, S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO,
+ NULL, NULL);
+ if (!error) {
+ inc_nlink(dentry->d_parent->d_inode);
+ fsnotify_mkdir(dentry->d_parent->d_inode, dentry);
+ }
return end_creating(dentry, error);
}
EXPORT_SYMBOL_GPL(debugfs_create_dir);