rpms/kernel/F-13 inotify-fix-inotify-oneshot-support.patch, NONE, 1.1 inotify-send-IN_UNMOUNT-events.patch, NONE, 1.1 kernel.spec, 1.2099, 1.2100

Chuck Ebbert cebbert at fedoraproject.org
Fri Jul 16 14:33:24 UTC 2010


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv31427

Modified Files:
	kernel.spec 
Added Files:
	inotify-fix-inotify-oneshot-support.patch 
	inotify-send-IN_UNMOUNT-events.patch 
Log Message:
inotify-fix-inotify-oneshot-support.patch,
  inotify-send-IN_UNMOUNT-events.patch:
  Fix broken oneshot support and missing umount events. (#607327)

inotify-fix-inotify-oneshot-support.patch:
 inotify_fsnotify.c |    3 +++
 1 file changed, 3 insertions(+)

--- NEW FILE inotify-fix-inotify-oneshot-support.patch ---
#607327

During the large inotify rewrite to fsnotify I completely dropped support
for IN_ONESHOT.  Reimplement that support.

Signed-off-by: Eric Paris <eparis at 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(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

inotify-send-IN_UNMOUNT-events.patch:
 inotify_user.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- NEW FILE inotify-send-IN_UNMOUNT-events.patch ---
#607327 ?

Since the .31 or so notify rewrite inotify has not sent events about
inodes which are unmounted.  This patch restores those events.

Signed-off-by: Eric Paris <eparis at redhat.com>
---

 fs/notify/inotify/inotify_user.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 44aeb0f..f381daf 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -90,8 +90,11 @@ static inline __u32 inotify_arg_to_mask(u32 arg)
 {
 	__u32 mask;
 
-	/* everything should accept their own ignored and cares about children */
-	mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD);
+	/*
+	 * everything should accept their own ignored, cares about children,
+	 * and should receive events when the inode is unmounted
+	 */
+	mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD | FS_UNMOUNT);
 
 	/* mask off the flags used to open the fd */
 	mask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT));


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2099
retrieving revision 1.2100
diff -u -p -r1.2099 -r1.2100
--- kernel.spec	16 Jul 2010 06:32:07 -0000	1.2099
+++ kernel.spec	16 Jul 2010 14:33:22 -0000	1.2100
@@ -765,6 +765,9 @@ Patch12230: kbuild-fix-modpost-segfault.
 
 Patch12240: crypto-aesni-kill-module_alias.patch
 
+Patch12250: inotify-fix-inotify-oneshot-support.patch
+Patch12260: inotify-send-IN_UNMOUNT-events.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1409,6 +1412,10 @@ ApplyPatch kbuild-fix-modpost-segfault.p
 
 ApplyPatch crypto-aesni-kill-module_alias.patch
 
+# fix broken oneshot support and missing umount events (#607327)
+ApplyPatch inotify-fix-inotify-oneshot-support.patch
+ApplyPatch inotify-send-IN_UNMOUNT-events.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2028,6 +2035,11 @@ fi
 
 
 %changelog
+* Fri Jul 16 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.34.1-16
+- inotify-fix-inotify-oneshot-support.patch,
+  inotify-send-IN_UNMOUNT-events.patch:
+  Fix broken oneshot support and missing umount events. (#607327)
+
 * Fri Jul 16 2010 Ben Skeggs <bskeggs at redhat.com> 2.6.34.1-15
 - nouveau: fix lvds regression (#601002)
 - nouveau: bring back acpi edid support, with fixes (#613284)



More information about the scm-commits mailing list