]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
UBI: fix 64-bit calculations
authorBruce Leonard <brucle@selinc.com>
Thu, 3 Jul 2008 07:35:49 +0000 (10:35 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 24 Jul 2008 10:32:56 +0000 (13:32 +0300)
Signed-off-by: Bruce Leonard <brucle@selinc.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/cdev.c

index 0cdaf9fba7b09160095119c2de729f143e8979ef..3e3449ec07f0c6874fe943c55b7c761864b0be41 100644 (file)
@@ -437,7 +437,8 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file,
                        break;
                }
 
-               rsvd_bytes = vol->reserved_pebs * (ubi->leb_size-vol->data_pad);
+               rsvd_bytes = (long long)vol->reserved_pebs *
+                                       ubi->leb_size-vol->data_pad;
                if (bytes < 0 || bytes > rsvd_bytes) {
                        err = -EINVAL;
                        break;