aboutsummaryrefslogtreecommitdiffstats
path: root/fs/debugfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/debugfs/inode.c')
-rw-r--r--fs/debugfs/inode.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 137d76c3f90a..020da4c60593 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -24,6 +24,7 @@
24#include <linux/kobject.h> 24#include <linux/kobject.h>
25#include <linux/namei.h> 25#include <linux/namei.h>
26#include <linux/debugfs.h> 26#include <linux/debugfs.h>
27#include <linux/fsnotify.h>
27 28
28#define DEBUGFS_MAGIC 0x64626720 29#define DEBUGFS_MAGIC 0x64626720
29 30
@@ -87,15 +88,22 @@ static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
87 88
88 mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR; 89 mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR;
89 res = debugfs_mknod(dir, dentry, mode, 0); 90 res = debugfs_mknod(dir, dentry, mode, 0);
90 if (!res) 91 if (!res) {
91 inc_nlink(dir); 92 inc_nlink(dir);
93 fsnotify_mkdir(dir, dentry);
94 }
92 return res; 95 return res;
93} 96}
94 97
95static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode) 98static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode)
96{ 99{
100 int res;
101
97 mode = (mode & S_IALLUGO) | S_IFREG; 102 mode = (mode & S_IALLUGO) | S_IFREG;
98 return debugfs_mknod(dir, dentry, mode, 0); 103 res = debugfs_mknod(dir, dentry, mode, 0);
104 if (!res)
105 fsnotify_create(dir, dentry);
106 return res;
99} 107}
100 108
101static inline int debugfs_positive(struct dentry *dentry) 109static inline int debugfs_positive(struct dentry *dentry)