[PATCH] rwsem-spinlock linkage error

Linux Kernel Mailing List <[email protected]> Wed, 27 Apr 2005 15:28:47 +0000
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1506, 2005/04/27 12:28:47-03:00, [email protected]

	[PATCH] rwsem-spinlock linkage error
	
	The
	
	Andrew Morton:
	  o rwsem: Make rwsems use interrupt disabling spinlocks
	
	change in 2.4.31-pre1 has a typo: one occurrence of spin_unlock() was
	changed to spin_unlock_restore() instead of spin_unlock_irqrestore()
	as was obviously the intention. Since spin_unlock_restore() doesn't
	exist, this results in linkage errors on x86_64 and other archs using
	CONFIG_RWSEM_GENERIC_SPINLOCK.
	
	Trival fix below.
	
	Signed-off-by: Mikael Pettersson <[email protected]>



 rwsem-spinlock.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c
--- a/lib/rwsem-spinlock.c	2005-04-27 15:05:10 -07:00
+++ b/lib/rwsem-spinlock.c	2005-04-27 15:05:10 -07:00
@@ -269,7 +269,7 @@
 	if (--sem->activity==0 && !list_empty(&sem->wait_list))
 		sem = __rwsem_wake_one_writer(sem);
 
-	spin_unlock_restore(&sem->wait_lock, flags);
+	spin_unlock_irqrestore(&sem->wait_lock, flags);
 
 	rwsemtrace(sem,"Leaving __up_read");
 }