UBIFS: check return code
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 23 May 2010 11:16:13 +0000 (14:16 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sat, 12 Jun 2010 11:45:25 +0000 (14:45 +0300)
The error code from 'ubifs_rcvry_gc_commit()' was ignored, so UBIFS
failed to recover and continued. Instead, we should refuse mounting
the file-system.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/super.c

index 4d2f215..010eea0 100644 (file)
@@ -1307,6 +1307,8 @@ static int mount_ubifs(struct ubifs_info *c)
                        if (err)
                                goto out_orphans;
                        err = ubifs_rcvry_gc_commit(c);
+                       if (err)
+                               goto out_orphans;
                } else {
                        err = take_gc_lnum(c);
                        if (err)