[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1381753562-47884-4-git-send-email-wangkefeng.wang@huawei.com>
Date: Mon, 14 Oct 2013 20:26:02 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: Alexander Viro <viro@...iv.linux.org.uk>
CC: John McCutchan <john@...nmccutchan.com>,
"J. Bruce Fields" <bfields@...ldses.org>,
Eric Paris <eparis@...hat.com>, Robert Love <rlove@...ve.org>,
<linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
<linux-nfs@...r.kernel.org>
Subject: [PATCH 3/3] fs: notify: use path_equal() to simply code
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
fs/notify/fanotify/fanotify.c | 3 +--
fs/notify/inotify/inotify_fsnotify.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 0c2f912..777af06 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -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):
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
index 4216308..58b638d 100644
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -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):
--
1.8.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists