]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/fsnotify.h
PCI Hotplug: convert acpi_pci_detect_ejectable() to take an acpi_handle
[karo-tx-linux.git] / include / linux / fsnotify.h
index c25b39ddd62ae0476cfe961c70098f7110f583eb..936f9aa8bb97581e5ff798e1d92035556eaf88cd 100644 (file)
@@ -71,12 +71,11 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
        struct inode *source = moved->d_inode;
        u32 in_cookie = inotify_get_cookie();
        u32 fs_cookie = fsnotify_get_cookie();
-       __u32 old_dir_mask = 0;
-       __u32 new_dir_mask = 0;
+       __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;
@@ -84,9 +83,6 @@ 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, in_cookie, old_name,
                                  source);
        inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, in_cookie, new_name,