[zaptel-commits] russell: branch 1.4 r3664 - in /branches/1.4: ./ zaptel-base.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Jan 11 14:39:35 CST 2008


Author: russell
Date: Fri Jan 11 14:39:35 2008
New Revision: 3664

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3664
Log:
Merged revisions 3663 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r3663 | russell | 2008-01-11 14:38:47 -0600 (Fri, 11 Jan 2008) | 8 lines

Revert an unnecessary trylock.  Multiple people have looked at this and nobody
can see any reason why this would be required.

(closes issue #10791)
Reported by: Matti
Patches:
      patch uploaded by Matti (license 109)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/zaptel-base.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel-base.c?view=diff&rev=3664&r1=3663&r2=3664
==============================================================================
--- branches/1.4/zaptel-base.c (original)
+++ branches/1.4/zaptel-base.c Fri Jan 11 14:39:35 2008
@@ -1158,19 +1158,7 @@
 	if ((zone >= ZT_TONE_ZONE_MAX) || (zone < -1))
 		return -EINVAL;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
-	/* Since this routine is called both from IRQ as well as from userspace,
-	 * it is possible that we could be called during an IRQ while userspace
-	 * has locked this.  However unlikely, this could possibly cause a
-	 * deadlock. */
-	if (! read_trylock(&zone_lock))
-		return -EWOULDBLOCK;
-#else
-	/* But there are no trylock macros for kernel versions before 2.6.11,
-	 * so we do the unsafe thing anyway.  Such is the problem for dealing
-	 * with old, buggy kernels. */
 	read_lock(&zone_lock);
-#endif
 
 	if (zone == -1) {
 		zone = default_zone;
@@ -1184,6 +1172,7 @@
 	}
 
 	read_unlock(&zone_lock);
+
 	return res;
 }
 




More information about the zaptel-commits mailing list