aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify.h
diff options
context:
space:
mode:
authorAmy Griffis <amy.griffis@hp.com>2005-11-03 10:57:06 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2006-03-20 14:08:53 -0500
commitf38aa94224c5517a40ba56d453779f70d3229803 (patch)
tree30d0f7390cb2f1cf33a55080cb6c0676727af1fa /include/linux/fsnotify.h
parent90d526c074ae5db484388da56c399acf892b6c17 (diff)
[PATCH] Pass dentry, not just name, in fsnotify creation hooks.
The audit hooks (to be added shortly) will want to see dentry->d_inode too, not just the name. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r--include/linux/fsnotify.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index 03b8e7932b83..b5ff64d2f092 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -70,19 +70,20 @@ static inline void fsnotify_inoderemove(struct inode *inode)
70/* 70/*
71 * fsnotify_create - 'name' was linked in 71 * fsnotify_create - 'name' was linked in
72 */ 72 */
73static inline void fsnotify_create(struct inode *inode, const char *name) 73static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
74{ 74{
75 inode_dir_notify(inode, DN_CREATE); 75 inode_dir_notify(inode, DN_CREATE);
76 inotify_inode_queue_event(inode, IN_CREATE, 0, name); 76 inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name);
77} 77}
78 78
79/* 79/*
80 * fsnotify_mkdir - directory 'name' was created 80 * fsnotify_mkdir - directory 'name' was created
81 */ 81 */
82static inline void fsnotify_mkdir(struct inode *inode, const char *name) 82static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
83{ 83{
84 inode_dir_notify(inode, DN_CREATE); 84 inode_dir_notify(inode, DN_CREATE);
85 inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, name); 85 inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0,
86 dentry->d_name.name);
86} 87}
87 88
88/* 89/*