UBI: fix autoresize handling in R/O mode
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Sat, 18 Aug 2012 12:11:42 +0000 (14:11 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:48:18 +0000 (03:48 +0100)
commitaa85d9855447adcbc162705e922654ff4df96467
tree602bde2d037e6a8bb02997c3b8a1a39f5c4b2bea
parentf11829e7da3cd59400fe60287a3c3a11a6ddb2ac
UBI: fix autoresize handling in R/O mode

commit abb3e01103eb4e2ea5c15e6fedbc74e08bd4cc2b upstream.

Currently UBI fails in autoresize when it is in R/O mode (e.g., because the
underlying MTD device is R/O). This patch fixes the issue - we just skip
autoresize and print a warning.

Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/mtd/ubi/build.c