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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Oct 2012 15:27:26 +0000 (08:27 -0700)
commit079c1ed89e26fb3548b92f137848e11158c8e691
tree64375b4573110ae5c49902047eebcd6144868778
parente54195a3bb9d5025d96b0e3d3bb8de07a506d4f5
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/ubi/build.c