Skip to content

Commit

Permalink
md/raid5: small tidyup in raid5_align_endio
Browse files Browse the repository at this point in the history
Diving through ->queue to find mddev is unnecessarily complex - there
is an easier path to finding mddev, so use that.

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed May 18, 2010
1 parent a78d38a commit 2b7f222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3713,10 +3713,10 @@ static void raid5_align_endio(struct bio *bi, int error)

bio_put(bi);

mddev = raid_bi->bi_bdev->bd_disk->queue->queuedata;
conf = mddev->private;
rdev = (void*)raid_bi->bi_next;
raid_bi->bi_next = NULL;
mddev = rdev->mddev;
conf = mddev->private;

rdev_dec_pending(rdev, conf->mddev);

Expand Down

0 comments on commit 2b7f222

Please sign in to comment.