UBIFS: check ubifs_scan error codes better
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 25 Aug 2009 13:22:53 +0000 (16:22 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 22 Sep 2009 08:31:35 +0000 (11:31 +0300)
commiteafcc45ea836cbee64cef035a12cb5d6ff2fd242
treec34a348e3db7ba6d2d55abd4425160fdf585930e
parenta683a9a11cdac577cd6553fe3c326749b2b2e1fb
UBIFS: check ubifs_scan error codes better

The 'ubifs_scan()' function returns -EUCLEAN if something is corrupted
and recovery is needed, otherwise it returns other error codes. However,
in few places UBIFS does not check the error codes and runs recovery.
This patch changes this behavior and makes UBIFS start recovery only
on -EUCLEAN errors.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com>
fs/ubifs/master.c
fs/ubifs/orphan.c