linux/debian/patches/bugfix/all/inotify-fix-inotify-oneshot...

34 lines
1.1 KiB
Diff

Subject: [1/2] inotify: fix inotify oneshot support
Date: Thu, 08 Jul 2010 20:58:11 -0000
From: Eric Paris <eparis@redhat.com>
X-Patchwork-Id: 110926
Message-Id: <20100708205811.21351.60266.stgit@paris.rdu.redhat.com>
To: linux-kernel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk
RH BZ #607327
During the large inotify rewrite to fsnotify I completely dropped support
for IN_ONESHOT. Reimplement that support.
Signed-off-by: Eric Paris <eparis@redhat.com>
---
fs/notify/inotify/inotify_fsnotify.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
index daa666a..388a150 100644
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -126,6 +126,9 @@ static int inotify_handle_event(struct fsnotify_group *group, struct fsnotify_ev
ret = 0;
}
+ if (entry->mask & IN_ONESHOT)
+ fsnotify_destroy_mark_by_entry(entry);
+
/*
* If we hold the entry until after the event is on the queue
* IN_IGNORED won't be able to pass this event in the queue