DebugFS : inotify create/mkdir support

Add inotify create and mkdir events to DebugFS.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


authored by Mathieu Desnoyers and committed by Greg Kroah-Hartman 4f36557f 44c53c4f

+10 -2
+10 -2
fs/debugfs/inode.c
··· 24 24 #include <linux/kobject.h> 25 25 #include <linux/namei.h> 26 26 #include <linux/debugfs.h> 27 + #include <linux/fsnotify.h> 27 28 28 29 #define DEBUGFS_MAGIC 0x64626720 29 30 ··· 88 87 89 88 mode = (mode & (S_IRWXUGO | S_ISVTX)) | S_IFDIR; 90 89 res = debugfs_mknod(dir, dentry, mode, 0); 91 - if (!res) 90 + if (!res) { 92 91 inc_nlink(dir); 92 + fsnotify_mkdir(dir, dentry); 93 + } 93 94 return res; 94 95 } 95 96 96 97 static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode) 97 98 { 99 + int res; 100 + 98 101 mode = (mode & S_IALLUGO) | S_IFREG; 99 - return debugfs_mknod(dir, dentry, mode, 0); 102 + res = debugfs_mknod(dir, dentry, mode, 0); 103 + if (!res) 104 + fsnotify_create(dir, dentry); 105 + return res; 100 106 } 101 107 102 108 static inline int debugfs_positive(struct dentry *dentry)