summaryrefslogtreecommitdiff
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-27 01:11:03 +0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-27 01:11:03 +0400
commit8b0ee07e108b2eefdab5bb73f33223f18926c3b2 (patch)
treef68ca04180c5488301a40ec212ef2eb2467cf56c /drivers/md/linear.c
parent4638aef40ba9ebb9734caeed1f373c24015259fd (diff)
parent8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff)
downloadlinux-8b0ee07e108b2eefdab5bb73f33223f18926c3b2.tar.xz
Merge upstream (approx. 2.6.12-git8) into 'janitor' branch of netdev-2.6.
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 161e9aa87291..8d740013d74d 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -217,8 +217,7 @@ static int linear_run (mddev_t *mddev)
return 0;
out:
- if (conf)
- kfree(conf);
+ kfree(conf);
return 1;
}
@@ -269,9 +268,8 @@ static int linear_make_request (request_queue_t *q, struct bio *bio)
* split it.
*/
struct bio_pair *bp;
- bp = bio_split(bio, bio_split_pool,
- (bio->bi_sector + (bio->bi_size >> 9) -
- (tmp_dev->offset + tmp_dev->size))<<1);
+ bp = bio_split(bio, bio_split_pool,
+ ((tmp_dev->offset + tmp_dev->size)<<1) - bio->bi_sector);
if (linear_make_request(q, &bp->bio1))
generic_make_request(&bp->bio1);
if (linear_make_request(q, &bp->bio2))