summaryrefslogtreecommitdiffstats
path: root/fs/debugfs/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-01-25 14:17:11 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-01-25 16:52:52 -0500
commit3473cde5655cf4501cadb8ed11ab8aad1484b377 (patch)
tree621b1f7b3f61cfdeb8b3fea4aa0ee9b4358e8d0f /fs/debugfs/inode.c
parent02538a75ba176d286a421d1e41a66061f407c3b3 (diff)
downloadop-kernel-dev-3473cde5655cf4501cadb8ed11ab8aad1484b377.zip
op-kernel-dev-3473cde5655cf4501cadb8ed11ab8aad1484b377.tar.gz
fold debugfs_create() into caller
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/debugfs/inode.c')
-rw-r--r--fs/debugfs/inode.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 8d12935..778c0e3 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -84,19 +84,6 @@ static int debugfs_mknod(struct dentry *dentry,
return 0;
}
-static int debugfs_create(struct dentry *dentry, umode_t mode,
- void *data, const struct file_operations *fops)
-{
- struct inode *dir = dentry->d_parent->d_inode;
- int res;
-
- mode = (mode & S_IALLUGO) | S_IFREG;
- res = debugfs_mknod(dentry, mode, data, fops);
- if (!res)
- fsnotify_create(dir, dentry);
- return res;
-}
-
static inline int debugfs_positive(struct dentry *dentry)
{
return dentry->d_inode && !d_unhashed(dentry);
@@ -362,7 +349,9 @@ struct dentry *debugfs_create_file(const char *name, umode_t mode,
if (IS_ERR(dentry))
return NULL;
- error = debugfs_create(dentry, mode, data, fops);
+ error = debugfs_mknod(dentry, mode, data, fops);
+ if (!error)
+ fsnotify_create(dentry->d_parent->d_inode, dentry);
return end_creating(dentry, error);
}
EXPORT_SYMBOL_GPL(debugfs_create_file);
OpenPOWER on IntegriCloud