Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207654
b: refs/heads/master
c: 9dced01
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris committed Jul 28, 2010
1 parent df459c6 commit 077e24c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a12a7dd3284f5644326af1ea53b35030f205dd29
refs/heads/master: 9dced01a0939f3e952eca8c21427ceec1f473dcf
10 changes: 10 additions & 0 deletions trunk/fs/notify/fanotify/fanotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ static int fanotify_merge(struct list_head *list, struct fsnotify_event *event)
if (test_event->mask == event->mask)
goto out;

/*
* if the refcnt == 1 this is the only queue
* for this event and so we can update the mask
* in place.
*/
if (atomic_read(&test_event->refcnt) == 1) {
test_event->mask |= event->mask;
goto out;
}

/* can't allocate memory, merge was no possible */
new_event = fsnotify_clone_event(test_event);
if (unlikely(!new_event)) {
Expand Down

0 comments on commit 077e24c

Please sign in to comment.