aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorCoywolf Qi Hunt <qiyong@freeforge.net>2006-10-03 01:15:50 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 08:04:17 -0700
commit2d2063ceae73660d5142f4754d50a75b655fd1f9 (patch)
treefc0e810ec5e7fa01ab53fca93043d68813d9de7f /drivers
parent9b1d1dac181d8c1b9492e05cee660a985d035a06 (diff)
[PATCH] md: remove unnecessary variable x in stripe_to_pdidx()
Signed-off-by: Coywolf Qi Hunt <qiyong@freeforge.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/raid5.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 1c8ab340a11..46fd651539f 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1351,10 +1351,9 @@ static int page_is_zero(struct page *p)
static int stripe_to_pdidx(sector_t stripe, raid5_conf_t *conf, int disks)
{
int sectors_per_chunk = conf->chunk_size >> 9;
- sector_t x = stripe;
int pd_idx, dd_idx;
- int chunk_offset = sector_div(x, sectors_per_chunk);
- stripe = x;
+ int chunk_offset = sector_div(stripe, sectors_per_chunk);
+
raid5_compute_sector(stripe*(disks-1)*sectors_per_chunk
+ chunk_offset, disks, disks-1, &dd_idx, &pd_idx, conf);
return pd_idx;