From: Artem Bityutskiy Date: Mon, 20 Aug 2012 12:16:24 +0000 (+0300) Subject: UBIFS: fix crash on error path X-Git-Tag: v3.6-rc4~22^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11e3be0be2a1314e0861304857e7efcaed5d3e54;p=pandora-kernel.git UBIFS: fix crash on error path This patch fixes a regression introduced by "4994297 UBIFS: make ubifs_lpt_init clean-up in case of failure" which I've hit while running the 'integck -p' test. When remount the file-system from R/O mode to R/W mode and 'lpt_init_wr()' fails, we free _all_ LPT resources by calling 'ubifs_lpt_free(c, 0)', even those needed for R/O mode. This leads to subsequent crashes, e.g., if we try to unmount the file-system. Cc: stable@vger.kernel.org [v3.5+] Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed