Commit 956235af authored by Amir Goldstein's avatar Amir Goldstein Committed by Jan Kara

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/20200708111156.24659-6-amir73il@gmail.comSigned-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 9991bb84
...@@ -39,7 +39,7 @@ static bool event_compare(struct fsnotify_event *old_fsn, ...@@ -39,7 +39,7 @@ static bool event_compare(struct fsnotify_event *old_fsn,
if (old->mask & FS_IN_IGNORED) if (old->mask & FS_IN_IGNORED)
return false; return false;
if ((old->mask == new->mask) && if ((old->mask == new->mask) &&
(old_fsn->objectid == new_fsn->objectid) && (old->wd == new->wd) &&
(old->name_len == new->name_len) && (old->name_len == new->name_len) &&
(!old->name_len || !strcmp(old->name, new->name))) (!old->name_len || !strcmp(old->name, new->name)))
return true; return true;
...@@ -116,7 +116,7 @@ int inotify_handle_event(struct fsnotify_group *group, ...@@ -116,7 +116,7 @@ int inotify_handle_event(struct fsnotify_group *group,
mask &= ~IN_ISDIR; mask &= ~IN_ISDIR;
fsn_event = &event->fse; fsn_event = &event->fse;
fsnotify_init_event(fsn_event, (unsigned long)inode); fsnotify_init_event(fsn_event, 0);
event->mask = mask; event->mask = mask;
event->wd = i_mark->wd; event->wd = i_mark->wd;
event->sync_cookie = cookie; event->sync_cookie = cookie;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment