projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9991bb8
)
inotify: do not use objectid when comparing events
author
Amir Goldstein
<amir73il@gmail.com>
Wed, 8 Jul 2020 11:11:41 +0000
(14:11 +0300)
committer
Jan Kara
<jack@suse.cz>
Wed, 15 Jul 2020 15:36:58 +0000
(17:36 +0200)
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.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/inotify/inotify_fsnotify.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/notify/inotify/inotify_fsnotify.c
b/fs/notify/inotify/inotify_fsnotify.c
index 2ebc890471533737a5f33695e6e1cb90f20316da..9b481460a2dcec732a9f6da05cd984f10ab82817 100644
(file)
--- a/
fs/notify/inotify/inotify_fsnotify.c
+++ b/
fs/notify/inotify/inotify_fsnotify.c
@@
-39,7
+39,7
@@
static bool event_compare(struct fsnotify_event *old_fsn,
if (old->mask & FS_IN_IGNORED)
return false;
if ((old->mask == new->mask) &&
- (old
_fsn->objectid == new_fsn->objecti
d) &&
+ (old
->wd == new->w
d) &&
(old->name_len == new->name_len) &&
(!old->name_len || !strcmp(old->name, new->name)))
return true;
@@
-116,7
+116,7
@@
int inotify_handle_event(struct fsnotify_group *group,
mask &= ~IN_ISDIR;
fsn_event = &event->fse;
- fsnotify_init_event(fsn_event,
(unsigned long)inode
);
+ fsnotify_init_event(fsn_event,
0
);
event->mask = mask;
event->wd = i_mark->wd;
event->sync_cookie = cookie;