[PATCH] md: fix sizing problem with raid5-reshape and CONFIG_LBD=n
authorNeilBrown <neilb@suse.de>
Thu, 9 Nov 2006 01:44:48 +0000 (17:44 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 9 Nov 2006 02:29:24 +0000 (18:29 -0800)
I forgot to has the size-in-blocks to (loff_t) before shifting up to a
size-in-bytes.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid5.c

index e14f457..69c3e20 100644 (file)
@@ -3659,7 +3659,7 @@ static void end_reshape(raid5_conf_t *conf)
                bdev = bdget_disk(conf->mddev->gendisk, 0);
                if (bdev) {
                        mutex_lock(&bdev->bd_inode->i_mutex);
-                       i_size_write(bdev->bd_inode, conf->mddev->array_size << 10);
+                       i_size_write(bdev->bd_inode, (loff_t)conf->mddev->array_size << 10);
                        mutex_unlock(&bdev->bd_inode->i_mutex);
                        bdput(bdev);
                }