public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Review: do not hold dm_reg_lock spinlock when calling dm_add_fsys_entry()
@ 2007-03-30  1:34 Vlad Apostolov
  0 siblings, 0 replies; only message in thread
From: Vlad Apostolov @ 2007-03-30  1:34 UTC (permalink / raw)
  To: xfs-dev; +Cc: xfs-oss

[-- Attachment #1: Type: text/plain, Size: 104 bytes --]


dm_reg_lock spinlock has been held when calling dm_add_fsys_entry()

Attached is a fix.

Regards,
Vlad

[-- Attachment #2: sleeping-in-atomic-in-dmapi.patch --]
[-- Type: text/x-patch, Size: 525 bytes --]

Index: linux/fs/dmapi/dmapi_register.c
===================================================================
--- linux.orig/fs/dmapi/dmapi_register.c
+++ linux/fs/dmapi/dmapi_register.c
@@ -252,6 +252,7 @@ dm_add_fsys_entry(
 		fsrp->fr_next = dm_registers;
 		dm_registers = fsrp;
 		dm_fsys_cnt++;
+		mutex_spinunlock(&dm_reg_lock, lc);
 #ifdef CONFIG_PROC_FS
 		{
 		char buf[100];
@@ -262,7 +263,6 @@ dm_add_fsys_entry(
 		entry->owner = THIS_MODULE;
 		}
 #endif
-		mutex_spinunlock(&dm_reg_lock, lc);
 		return(0);
 	}
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-30  1:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-30  1:34 Review: do not hold dm_reg_lock spinlock when calling dm_add_fsys_entry() Vlad Apostolov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox