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 4d2f2157dd3fa9a70a680baea10a68fba7a56061..010eea0090367aa7b54ec1f7de6802dad0d0106d 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)