diff options
| -rw-r--r-- | fs/debugfs/inode.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 8d12935c87f1..778c0e32eb51 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
| @@ -84,19 +84,6 @@ static int debugfs_mknod(struct dentry *dentry, | |||
| 84 | return 0; | 84 | return 0; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | static int debugfs_create(struct dentry *dentry, umode_t mode, | ||
| 88 | void *data, const struct file_operations *fops) | ||
| 89 | { | ||
| 90 | struct inode *dir = dentry->d_parent->d_inode; | ||
| 91 | int res; | ||
| 92 | |||
| 93 | mode = (mode & S_IALLUGO) | S_IFREG; | ||
| 94 | res = debugfs_mknod(dentry, mode, data, fops); | ||
| 95 | if (!res) | ||
| 96 | fsnotify_create(dir, dentry); | ||
| 97 | return res; | ||
| 98 | } | ||
| 99 | |||
| 100 | static inline int debugfs_positive(struct dentry *dentry) | 87 | static inline int debugfs_positive(struct dentry *dentry) |
| 101 | { | 88 | { |
| 102 | return dentry->d_inode && !d_unhashed(dentry); | 89 | return dentry->d_inode && !d_unhashed(dentry); |
| @@ -362,7 +349,9 @@ struct dentry *debugfs_create_file(const char *name, umode_t mode, | |||
| 362 | if (IS_ERR(dentry)) | 349 | if (IS_ERR(dentry)) |
| 363 | return NULL; | 350 | return NULL; |
| 364 | 351 | ||
| 365 | error = debugfs_create(dentry, mode, data, fops); | 352 | error = debugfs_mknod(dentry, mode, data, fops); |
| 353 | if (!error) | ||
| 354 | fsnotify_create(dentry->d_parent->d_inode, dentry); | ||
| 366 | return end_creating(dentry, error); | 355 | return end_creating(dentry, error); |
| 367 | } | 356 | } |
| 368 | EXPORT_SYMBOL_GPL(debugfs_create_file); | 357 | EXPORT_SYMBOL_GPL(debugfs_create_file); |
