summaryrefslogtreecommitdiff
path: root/kernel/sys_ni.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-17 21:24:25 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:58:55 -0400
commit9dced01a0939f3e952eca8c21427ceec1f473dcf (patch)
tree10eab41808fd16d7db9b6737bccf30fb53eb4faa /kernel/sys_ni.c
parenta12a7dd3284f5644326af1ea53b35030f205dd29 (diff)
fanotify: do not clone on merge unless needed
Currently if 2 events are going to be merged on the notication queue with different masks the second event will be cloned and will replace the first event. However if this notification queue is the only place referencing the event in question there is no reason not to just update the event in place. We can tell this if the event->refcnt == 1. Since we hold a reference for each queue this event is on we know that when refcnt == 1 this is the only queue. The other concern is that it might be about to be added to a new queue, but this can't be the case since fsnotify holds a reference on the event until it is finished adding it to queues. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel/sys_ni.c')
0 files changed, 0 insertions, 0 deletions