[dm-devel] [PATCH] 8/9: Use spin_lock_irqsave() for m->path_lock

Kevin Corry kevcorry at us.ibm.com
Tue Jan 13 17:01:03 UTC 2004


m->path_lock needs to be locked with spin_lock_irqsave() and unlocked with
spin_lock_irqrestore().
--- diff/drivers/md/dm-mpath.c	2004-01-13 15:22:03.000000000 -0600
+++ source/drivers/md/dm-mpath.c	2004-01-13 15:21:51.000000000 -0600
@@ -689,11 +689,11 @@
 	if (error) {
 		struct path *path;
 
-		spin_lock(&m->path_lock);
+		spin_lock_irqsave(&m->path_lock, flags);
 		path = __find_path(m, bio->bi_bdev);
 		__fail_path(path);
 		r = __remap_io(m, bio);
-		spin_unlock(&m->path_lock);
+		spin_unlock_irqrestore(&m->path_lock, flags);
 
 		if (!r) {
 			/* queue for the daemon to resubmit */





More information about the dm-devel mailing list