diff options
Diffstat (limited to 'fs/debugfs/inode.c')
-rw-r--r-- | fs/debugfs/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index e77676df6713..137d76c3f90a 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mount.h> | 21 | #include <linux/mount.h> |
22 | #include <linux/pagemap.h> | 22 | #include <linux/pagemap.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/kobject.h> | ||
24 | #include <linux/namei.h> | 25 | #include <linux/namei.h> |
25 | #include <linux/debugfs.h> | 26 | #include <linux/debugfs.h> |
26 | 27 | ||
@@ -147,13 +148,13 @@ static int debugfs_create_by_name(const char *name, mode_t mode, | |||
147 | *dentry = NULL; | 148 | *dentry = NULL; |
148 | mutex_lock(&parent->d_inode->i_mutex); | 149 | mutex_lock(&parent->d_inode->i_mutex); |
149 | *dentry = lookup_one_len(name, parent, strlen(name)); | 150 | *dentry = lookup_one_len(name, parent, strlen(name)); |
150 | if (!IS_ERR(dentry)) { | 151 | if (!IS_ERR(*dentry)) { |
151 | if ((mode & S_IFMT) == S_IFDIR) | 152 | if ((mode & S_IFMT) == S_IFDIR) |
152 | error = debugfs_mkdir(parent->d_inode, *dentry, mode); | 153 | error = debugfs_mkdir(parent->d_inode, *dentry, mode); |
153 | else | 154 | else |
154 | error = debugfs_create(parent->d_inode, *dentry, mode); | 155 | error = debugfs_create(parent->d_inode, *dentry, mode); |
155 | } else | 156 | } else |
156 | error = PTR_ERR(dentry); | 157 | error = PTR_ERR(*dentry); |
157 | mutex_unlock(&parent->d_inode->i_mutex); | 158 | mutex_unlock(&parent->d_inode->i_mutex); |
158 | 159 | ||
159 | return error; | 160 | return error; |