@@ -24,8 +24,7 @@ static bool should_merge(struct fsnotify_event *old, struct fsnotify_event *new)
(new->mask & FAN_ALL_PERM_EVENTS))
return false;
#endif
- if ((old->path.mnt == new->path.mnt) &&
- (old->path.dentry == new->path.dentry))
+ if (path_equal(&old->path, &new->path))
return true;
break;
case (FSNOTIFY_EVENT_NONE):
@@ -53,8 +53,7 @@ static bool event_compare(struct fsnotify_event *old, struct fsnotify_event *new
return true;
break;
case (FSNOTIFY_EVENT_PATH):
- if ((old->path.mnt == new->path.mnt) &&
- (old->path.dentry == new->path.dentry))
+ if (path_equal(&old->path, &new->path))
return true;
break;
case (FSNOTIFY_EVENT_NONE):
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- fs/notify/fanotify/fanotify.c | 3 +-- fs/notify/inotify/inotify_fsnotify.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)