patch-2.2.0-pre7 linux/include/asm-i386/locks.h

Next file: linux/include/asm-i386/semaphore.h
Previous file: linux/include/asm-alpha/unistd.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre6/linux/include/asm-i386/locks.h linux/include/asm-i386/locks.h
@@ -62,7 +62,7 @@
 	   not be safe this way */
 	if(!--sp->users)
 	{
-		lock_clear_bit(0,&sp->lock);sp->cpu= NO_PROC_ID;
+		sp->cpu= NO_PROC_ID;lock_clear_bit(0,&sp->lock);
 		return 1;
 	}
 	return 0;
@@ -102,15 +102,17 @@
 
 extern __inline__ void spinunlock(struct spinlock *sp)
 {
+	int pri;
 	if(current->lock_order!=sp->priority)
 		panic("lock release order violation %s (%d)\n", sp->name, current->lock_order);
+	pri=sp->oldpri;
 	if(prim_spin_unlock(sp))
 	{
 		/*
 		 *	Update the debugging lock priority chain. We dumped
 		 *	our last right to the lock.
 		 */
-		current->lock_order=sp->oldpri;
+		current->lock_order=sp->pri;
 	}	
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov