linux/drivers/mtd/ubi
shengyong 2ebadea3ee UBI: return ENOSPC if no enough space available
[ Upstream commit 7c7feb2ebf ]

UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI error: init_volumes: not enough PEBs, required 706, available 686
UBI error: ubi_wl_init: no enough physical eraseblocks (-20, need 1)
UBI error: ubi_attach_mtd_dev: failed to attach mtd1, error -12 <= NOT ENOMEM
UBI error: ubi_init: cannot attach mtd1

If available PEBs are not enough when initializing volumes, return -ENOSPC
directly. If available PEBs are not enough when initializing WL, return
-ENOSPC instead of -ENOMEM.

Cc: stable@vger.kernel.org
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: David Gstir <david@sigma-star.at>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-10-27 22:14:16 -04:00
..
attach.c UBI: account for bitflips in both the VID header and data 2015-05-17 19:12:10 -04:00
block.c UBI: block: Add support for the UBI_VOLUME_UPDATED notification 2014-09-16 19:02:04 +03:00
build.c UBI: R/O block driver on top of UBI volumes 2014-02-28 16:29:48 +02:00
cdev.c UBI: fix check for "too many bytes" 2015-05-17 19:12:11 -04:00
debug.c UBI: embed ubi_debug_info field in ubi_device struct 2012-12-10 13:38:59 +02:00
debug.h mtd: rename random32() to prandom_u32() 2013-02-04 09:26:28 +02:00
eba.c UBI: fix out of bounds write 2015-05-17 19:12:10 -04:00
fastmap.c UBI: Fastmap: Calc fastmap size correctly 2014-10-03 17:33:28 +03:00
gluebi.c UBI: gluebi: rename misleading variables 2012-11-30 13:54:41 +02:00
io.c UBI: Validate data_size 2015-10-27 22:14:15 -04:00
kapi.c UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00
Kconfig UBI: block: Add CONFIG_BLOCK dependency 2014-03-04 14:49:53 +02:00
Makefile UBI: R/O block driver on top of UBI volumes 2014-02-28 16:29:48 +02:00
misc.c UBI: comply with coding style 2012-09-04 09:39:01 +03:00
ubi-media.h UBI: Add fastmap on-flash data structures 2012-10-03 12:29:37 +03:00
ubi.h UBI: wl: Rename cancel flag to shutdown 2014-09-26 13:43:32 +03:00
upd.c UBI: Fix invalid vfree() 2015-01-16 06:59:47 -08:00
vmt.c UBI: introduce helpers dbg_chk_{io, gen} 2012-12-10 13:38:59 +02:00
vtbl.c UBI: return ENOSPC if no enough space available 2015-10-27 22:14:16 -04:00
wl.c UBI: return ENOSPC if no enough space available 2015-10-27 22:14:16 -04:00