]> git.karo-electronics.de Git - karo-tx-linux.git/commit
inotify: fix coalesce duplicate events into a single event in special case
authorWei Yongjun <yjwei@cn.fujitsu.com>
Wed, 14 Oct 2009 12:54:03 +0000 (20:54 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:55:49 +0000 (15:55 -0700)
commit610370eb6f789cce3c79b3d07eef825939ad5a6b
treef4f042e98abff71a214ad80ea42d4a5630628356
parent2e776c1424b3c276c8cf6775f7e0b2f1ef42e624
inotify: fix coalesce duplicate events into a single event in special case

commit 3de0ef4f2067da58fa5126d821a56dcb98cdb565 upstream.

If we do rename a dir entry, like this:

  rename("/tmp/ino7UrgoJ.rename1", "/tmp/ino7UrgoJ.rename2")
  rename("/tmp/ino7UrgoJ.rename2", "/tmp/ino7UrgoJ")

The duplicate events should be coalesced into a single event. But those two
events do not be coalesced into a single event, due to some bad check in
event_compare(). It can not match the two NULL inodes as the same event.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/notify/notification.c