From: NeilBrown Date: Mon, 1 May 2006 19:15:47 +0000 (-0700) Subject: [PATCH] md: Fix 'rdev->nr_pending' count when retrying barrier requests X-Git-Tag: v2.6.17-rc4~95 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e7dd2ab6b9bdfa60e19b8739e6b2a204fd4f477;p=pandora-kernel.git [PATCH] md: Fix 'rdev->nr_pending' count when retrying barrier requests When retrying a failed BIO_RW_BARRIER request, we need to keep the reference in ->nr_pending over the whole retry. Currently, we only hold the reference if the failed request is the *last* one to finish - which is silly, because it would normally be the first to finish. So move the rdev_dec_pending call up into the didn't-fail branch. As the rdev isn't used in the later code, calling rdev_dec_pending earlier doesn't hurt. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed