aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/fsnotify.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index c25b39ddd62a..936f9aa8bb97 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -71,12 +71,11 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
71 struct inode *source = moved->d_inode; 71 struct inode *source = moved->d_inode;
72 u32 in_cookie = inotify_get_cookie(); 72 u32 in_cookie = inotify_get_cookie();
73 u32 fs_cookie = fsnotify_get_cookie(); 73 u32 fs_cookie = fsnotify_get_cookie();
74 __u32 old_dir_mask = 0; 74 __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM);
75 __u32 new_dir_mask = 0; 75 __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO);
76 76
77 if (old_dir == new_dir) { 77 if (old_dir == new_dir)
78 old_dir_mask = FS_DN_RENAME; 78 old_dir_mask |= FS_DN_RENAME;
79 }
80 79
81 if (isdir) { 80 if (isdir) {
82 isdir = IN_ISDIR; 81 isdir = IN_ISDIR;
@@ -84,9 +83,6 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
84 new_dir_mask |= FS_IN_ISDIR; 83 new_dir_mask |= FS_IN_ISDIR;
85 } 84 }
86 85
87 old_dir_mask |= FS_MOVED_FROM;
88 new_dir_mask |= FS_MOVED_TO;
89
90 inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir, in_cookie, old_name, 86 inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir, in_cookie, old_name,
91 source); 87 source);
92 inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, in_cookie, new_name, 88 inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, in_cookie, new_name,