From patchwork Mon Oct 14 12:26:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 3036101 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4ED309F243 for ; Mon, 14 Oct 2013 12:29:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40F6520219 for ; Mon, 14 Oct 2013 12:29:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1095D2023F for ; Mon, 14 Oct 2013 12:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932164Ab3JNM2d (ORCPT ); Mon, 14 Oct 2013 08:28:33 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:64608 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932121Ab3JNM2a (ORCPT ); Mon, 14 Oct 2013 08:28:30 -0400 Received: from 172.24.2.119 (EHLO szxeml213-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BJF67853; Mon, 14 Oct 2013 20:26:58 +0800 (CST) Received: from SZXEML461-HUB.china.huawei.com (10.82.67.204) by szxeml213-edg.china.huawei.com (172.24.2.30) with Microsoft SMTP Server (TLS) id 14.3.146.0; Mon, 14 Oct 2013 20:26:57 +0800 Received: from localhost (10.135.68.221) by szxeml461-hub.china.huawei.com (10.82.67.204) with Microsoft SMTP Server id 14.3.146.0; Mon, 14 Oct 2013 20:26:56 +0800 From: Kefeng Wang To: Alexander Viro CC: John McCutchan , "J. Bruce Fields" , Eric Paris , Robert Love , , , Subject: [PATCH 3/3] fs: notify: use path_equal() to simply code Date: Mon, 14 Oct 2013 20:26:02 +0800 Message-ID: <1381753562-47884-4-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.8.3.msysgit.0 In-Reply-To: <1381753562-47884-1-git-send-email-wangkefeng.wang@huawei.com> References: <1381753562-47884-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.135.68.221] X-CFilter-Loop: Reflected Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Kefeng Wang --- 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):