From: NeilBrown Date: Tue, 3 Oct 2006 08:15:53 +0000 (-0700) Subject: [PATCH] md: Improve locking around error handling X-Git-Tag: v2.6.19-rc1~243 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c04be0aa82ff535e3676ab3e573957bdeef41879;p=pandora-kernel.git [PATCH] md: Improve locking around error handling The error handling routines don't use proper locking, and so two concurrent errors could trigger a problem. So: - use test-and-set and test-and-clear to synchonise the In_sync bits with the ->degraded count - use the spinlock to protect updates to the degraded count (could use an atomic_t but that would be a bigger change in code, and isn't really justified) - remove un-necessary locking in raid5 Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed