linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] raid6_end_write_request() spinlock fix
@ 2006-04-25  3:35 Coywolf Qi Hunt
  2006-04-25  5:13 ` Neil Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Coywolf Qi Hunt @ 2006-04-25  3:35 UTC (permalink / raw)
  To: akpm; +Cc: neilb, linux-kernel, linux-raid

Hello,

Reduce the raid6_end_write_request() spinlock window.

Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
---

diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index bc69355..820536e 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -468,7 +468,6 @@ static int raid6_end_write_request (stru
  	struct stripe_head *sh = bi->bi_private;
 	raid6_conf_t *conf = sh->raid_conf;
 	int disks = conf->raid_disks, i;
-	unsigned long flags;
 	int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags);
 
 	if (bi->bi_size)
@@ -486,16 +485,14 @@ static int raid6_end_write_request (stru
 		return 0;
 	}
 
-	spin_lock_irqsave(&conf->device_lock, flags);
 	if (!uptodate)
 		md_error(conf->mddev, conf->disks[i].rdev);
 
 	rdev_dec_pending(conf->disks[i].rdev, conf->mddev);
-
 	clear_bit(R5_LOCKED, &sh->dev[i].flags);
 	set_bit(STRIPE_HANDLE, &sh->state);
-	__release_stripe(conf, sh);
-	spin_unlock_irqrestore(&conf->device_lock, flags);
+	release_stripe(sh);
+
 	return 0;
 }
 

-- 
Coywolf Qi Hunt

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-25  8:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-25  3:35 [patch 1/2] raid6_end_write_request() spinlock fix Coywolf Qi Hunt
2006-04-25  5:13 ` Neil Brown
2006-04-25  6:43   ` Coywolf Qi Hunt
2006-04-25  6:50     ` Neil Brown
2006-04-25  8:07       ` Coywolf Qi Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).