[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 */




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]