[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: fanotify: do not recalculate the mask if the ignored mask changed
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2010-10-30 18:59:13
Message-ID: 201010301859.o9UIxDLj014521 () hera ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/linus/192ca4d1941228e69c1fbeebab317725407e6e65
Commit: 192ca4d1941228e69c1fbeebab317725407e6e65
Parent: 8fcd65280abc4699510f1853ede31f43e8a3783a
Author: Eric Paris <eparis@redhat.com>
AuthorDate: Thu Oct 28 17:21:59 2010 -0400
Committer: Eric Paris <eparis@redhat.com>
CommitDate: Thu Oct 28 17:22:16 2010 -0400
fanotify: do not recalculate the mask if the ignored mask changed
If fanotify sets a new bit in the ignored mask it will cause the generic
fsnotify layer to recalculate the real mask. This is stupid since we
didn't change that part.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
fs/notify/fanotify/fanotify_user.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index ff1a908..fa71d5d 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -558,15 +558,15 @@ static __u32 fanotify_mark_add_to_mask(struct fsnotify_mark *fsn_mark,
__u32 mask,
unsigned int flags)
{
- __u32 oldmask;
+ __u32 oldmask = -1;
spin_lock(&fsn_mark->lock);
if (!(flags & FAN_MARK_IGNORED_MASK)) {
oldmask = fsn_mark->mask;
fsnotify_set_mark_mask_locked(fsn_mark, (oldmask | mask));
} else {
- oldmask = fsn_mark->ignored_mask;
- fsnotify_set_mark_ignored_mask_locked(fsn_mark, (oldmask | mask));
+ __u32 tmask = fsn_mark->ignored_mask | mask;
+ fsnotify_set_mark_ignored_mask_locked(fsn_mark, tmask);
if (flags & FAN_MARK_IGNORED_SURV_MODIFY)
fsn_mark->flags |= FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY;
}
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic