Skip to content

Commit 956235a

Browse files
amir73iljankara
authored andcommitted
inotify: do not use objectid when comparing events
inotify's event->wd is the object identifier. Compare that instead of the common fsnotidy event objectid, so we can get rid of the objectid field later. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Amir Goldstein <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent 9991bb8 commit 956235a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/notify/inotify/inotify_fsnotify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static bool event_compare(struct fsnotify_event *old_fsn,
3939
if (old->mask & FS_IN_IGNORED)
4040
return false;
4141
if ((old->mask == new->mask) &&
42-
(old_fsn->objectid == new_fsn->objectid) &&
42+
(old->wd == new->wd) &&
4343
(old->name_len == new->name_len) &&
4444
(!old->name_len || !strcmp(old->name, new->name)))
4545
return true;
@@ -116,7 +116,7 @@ int inotify_handle_event(struct fsnotify_group *group,
116116
mask &= ~IN_ISDIR;
117117

118118
fsn_event = &event->fse;
119-
fsnotify_init_event(fsn_event, (unsigned long)inode);
119+
fsnotify_init_event(fsn_event, 0);
120120
event->mask = mask;
121121
event->wd = i_mark->wd;
122122
event->sync_cookie = cookie;

0 commit comments

Comments
 (0)