macos: avoid leaking iocount on synthetic fsevents
authorDerrick Brashear <shadow@your-file-system.com>
Tue, 18 Dec 2012 14:04:15 +0000 (09:04 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Wed, 19 Dec 2012 15:05:14 +0000 (07:05 -0800)
in certain cases we could leak an iocount. clean up even if
our event couldn't be run

Change-Id: I3a69f637c38478ac5f20a42af7db7f8a0ba7539a
Reviewed-on: http://gerrit.openafs.org/8777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/afs/DARWIN/osi_misc.c

index 03792d9..e0de037 100644 (file)
@@ -88,6 +88,10 @@ loop:
                vnode_put(vp);
                AFS_GLOCK();
                ReleaseWriteLock(&tvc->lock);
+           } else {
+               AFS_GUNLOCK();
+               vnode_put(vp);
+               AFS_GLOCK();
            }
            ObtainReadLock(&afs_xvcache);
            uq = QPrev(tq);