diff options
author | Bruce Leonard <brucle@selinc.com> | 2008-07-03 03:35:49 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-07-24 06:32:56 -0400 |
commit | 73789a3d9fd8e500e121c1d4a5a2b16dd748ab5f (patch) | |
tree | 4242d190e1509e2b61566add8ab554a5aaf1f059 | |
parent | 23add7455c42eef63f8719bd268328047d4aed69 (diff) |
UBI: fix 64-bit calculations
Signed-off-by: Bruce Leonard <brucle@selinc.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 0cdaf9fba7b0..3e3449ec07f0 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -437,7 +437,8 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file, | |||
437 | break; | 437 | break; |
438 | } | 438 | } |
439 | 439 | ||
440 | rsvd_bytes = vol->reserved_pebs * (ubi->leb_size-vol->data_pad); | 440 | rsvd_bytes = (long long)vol->reserved_pebs * |
441 | ubi->leb_size-vol->data_pad; | ||
441 | if (bytes < 0 || bytes > rsvd_bytes) { | 442 | if (bytes < 0 || bytes > rsvd_bytes) { |
442 | err = -EINVAL; | 443 | err = -EINVAL; |
443 | break; | 444 | break; |