Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1476571
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/6] UBI: use vol->usable_leb_size instead of (ubi->leb_size - vol->data_pad) |
| Date | 2016-09-05 17:40 +0200 |
| Message-ID | <se4a6-5AV-21@gated-at.bofh.it> (permalink) |
| References | <se4a5-5AV-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
vol->usable_size is already set to ubi->leb_size - vol->data_pad. Use
vol->usable_size instead of recalculating it.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
drivers/mtd/ubi/cdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index 72ba84af6698..45c329694a5e 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -416,7 +416,7 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd,
}
rsvd_bytes = (long long)vol->reserved_pebs *
- ubi->leb_size-vol->data_pad;
+ vol->usable_leb_size;
if (bytes < 0 || bytes > rsvd_bytes) {
err = -EINVAL;
break;
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] UBI: add support for 'SLC mode' volumes Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 17:40 +0200
[PATCH 1/6] UBI: dissociate the on-flash format version and the userspace ABI version Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 17:40 +0200
[PATCH 6/6] UBI: add SLC mode support Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 17:40 +0200
[PATCH 5/6] UBI: io: support SLC mode accesses Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 17:40 +0200
[PATCH 2/6] UBI: rework the on-flash format versioning logic Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 17:40 +0200
[PATCH 3/6] UBI: use vol->usable_leb_size instead of (ubi->leb_size - vol->data_pad) Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 17:40 +0200
Re: [PATCH 3/6] UBI: use vol->usable_leb_size instead of (ubi->leb_size - vol->data_pad) Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 19:50 +0200
[PATCH 4/6] UBI: introduce per-volume leb_size Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-05 17:40 +0200
csiph-web