jbd: clean up journal_try_to_free_buffers()
[safe/jmp/linux-2.6] / include / linux / fsnotify.h
index db12d9d..936f9aa 100644 (file)
@@ -58,7 +58,7 @@ static inline void fsnotify_link_count(struct inode *inode)
 {
        inotify_inode_queue_event(inode, IN_ATTRIB, 0, NULL, NULL);
 
-       fsnotify(inode, FS_ATTRIB, inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, FS_ATTRIB, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
 }
 
 /*
@@ -69,13 +69,13 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
                                 int isdir, struct inode *target, struct dentry *moved)
 {
        struct inode *source = moved->d_inode;
-       u32 cookie = inotify_get_cookie();
-       __u32 old_dir_mask = 0;
-       __u32 new_dir_mask = 0;
+       u32 in_cookie = inotify_get_cookie();
+       u32 fs_cookie = fsnotify_get_cookie();
+       __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM);
+       __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO);
 
-       if (old_dir == new_dir) {
-               old_dir_mask = FS_DN_RENAME;
-       }
+       if (old_dir == new_dir)
+               old_dir_mask |= FS_DN_RENAME;
 
        if (isdir) {
                isdir = IN_ISDIR;
@@ -83,16 +83,13 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
                new_dir_mask |= FS_IN_ISDIR;
        }
 
-       old_dir_mask |= FS_MOVED_FROM;
-       new_dir_mask |= FS_MOVED_TO;
-
-       inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name,
+       inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir, in_cookie, old_name,
                                  source);
-       inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name,
+       inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, in_cookie, new_name,
                                  source);
 
-       fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE);
-       fsnotify(new_dir, new_dir_mask, new_dir, FSNOTIFY_EVENT_INODE);
+       fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie);
+       fsnotify(new_dir, new_dir_mask, new_dir, FSNOTIFY_EVENT_INODE, new_name, fs_cookie);
 
        if (target) {
                inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL, NULL);
@@ -104,7 +101,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
 
        if (source) {
                inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL);
-               fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE);
+               fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0);
        }
        audit_inode_child(new_name, moved, new_dir);
 }
@@ -138,7 +135,7 @@ static inline void fsnotify_inoderemove(struct inode *inode)
        inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL, NULL);
        inotify_inode_is_dead(inode);
 
-       fsnotify(inode, FS_DELETE_SELF, inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, FS_DELETE_SELF, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
        __fsnotify_inode_delete(inode);
 }
 
@@ -151,7 +148,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
                                  dentry->d_inode);
        audit_inode_child(dentry->d_name.name, dentry, inode);
 
-       fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);
 }
 
 /*
@@ -166,7 +163,7 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct
        fsnotify_link_count(inode);
        audit_inode_child(new_dentry->d_name.name, new_dentry, dir);
 
-       fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0);
 }
 
 /*
@@ -180,7 +177,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
        inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode);
        audit_inode_child(dentry->d_name.name, dentry, inode);
 
-       fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);
 }
 
 /*
@@ -197,7 +194,7 @@ static inline void fsnotify_access(struct dentry *dentry)
        inotify_inode_queue_event(inode, mask, 0, NULL, NULL);
 
        fsnotify_parent(dentry, mask);
-       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
 }
 
 /*
@@ -214,7 +211,7 @@ static inline void fsnotify_modify(struct dentry *dentry)
        inotify_inode_queue_event(inode, mask, 0, NULL, NULL);
 
        fsnotify_parent(dentry, mask);
-       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
 }
 
 /*
@@ -231,7 +228,7 @@ static inline void fsnotify_open(struct dentry *dentry)
        inotify_inode_queue_event(inode, mask, 0, NULL, NULL);
 
        fsnotify_parent(dentry, mask);
-       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
 }
 
 /*
@@ -250,7 +247,7 @@ static inline void fsnotify_close(struct file *file)
        inotify_inode_queue_event(inode, mask, 0, NULL, NULL);
 
        fsnotify_parent(dentry, mask);
-       fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE);
+       fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0);
 }
 
 /*
@@ -267,7 +264,7 @@ static inline void fsnotify_xattr(struct dentry *dentry)
        inotify_inode_queue_event(inode, mask, 0, NULL, NULL);
 
        fsnotify_parent(dentry, mask);
-       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE);
+       fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
 }
 
 /*
@@ -303,7 +300,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid)
                inotify_inode_queue_event(inode, mask, 0, NULL, NULL);
 
                fsnotify_parent(dentry, mask);
-               fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE);
+               fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
        }
 }