From: Eric Paris <eparis@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: viro@ZenIV.linux.org.uk, hch@lst.de, eparis@redhat.com
Subject: [PATCH 3/4] dnotify: do not bother to lock entry->lock when reading mask
Date: Mon, 01 Jun 2009 16:03:25 -0400 [thread overview]
Message-ID: <20090601200325.16582.39071.stgit@paris.rdu.redhat.com> (raw)
In-Reply-To: <20090601200314.16582.70992.stgit@paris.rdu.redhat.com>
entry->lock is needed to make sure entry->mask does not change while
manipulating it. In dnotify_should_send_event() we don't care if we get an
old or a new mask value out of this entry so there is no point it taking
the lock.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
fs/notify/dnotify/dnotify.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
index 5134e89..ec459b6 100644
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -153,9 +153,8 @@ static bool dnotify_should_send_event(struct fsnotify_group *group,
if (!entry)
return false;
- spin_lock(&entry->lock);
send = (mask & entry->mask);
- spin_unlock(&entry->lock);
+
fsnotify_put_mark(entry); /* matches fsnotify_find_mark_entry */
return send;
next prev parent reply other threads:[~2009-06-01 20:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 20:03 [PATCH 1/4] fsnotify: move events should indicate the event was on a child Eric Paris
2009-06-01 20:03 ` [PATCH 2/4] dnotify: do not use ?true:false when assigning to a bool Eric Paris
2009-06-01 20:03 ` Eric Paris [this message]
2009-06-01 20:03 ` [PATCH 4/4] inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD Eric Paris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090601200325.16582.39071.stgit@paris.rdu.redhat.com \
--to=eparis@redhat.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome