]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Fix the call to BUG() caused by no free segment found
authorTristan Lelong <tristan.lelong@blunderer.org>
Tue, 20 Nov 2012 00:16:15 +0000 (16:16 -0800)
committerPrasad Joshi <prasadjoshi.linux@gmail.com>
Thu, 22 Nov 2012 16:52:35 +0000 (22:22 +0530)
When some incomplete write is detected during the mount, logfs try to recover
and look for a free segment but the list of free segment is populated only later.
This patch switch both function calls.

Signed-off-by: Tristan Lelong <tlelong@adeneo-embedded.com>
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
fs/logfs/super.c

index 345c24b8a6f86965b39d7dd017fb294908ddd8d0..e726eb1f36ef4ca8952def42f4ade047c6186247 100644 (file)
@@ -287,14 +287,14 @@ static int logfs_make_writeable(struct super_block *sb)
        if (err)
                return err;
 
+       /* Do one GC pass before any data gets dirtied */
+       logfs_gc_pass(sb);
+
        /* Check areas for trailing unaccounted data */
        err = logfs_check_areas(sb);
        if (err)
                return err;
 
-       /* Do one GC pass before any data gets dirtied */
-       logfs_gc_pass(sb);
-
        /* after all initializations are done, replay the journal
         * for rw-mounts, if necessary */
        err = logfs_replay_journal(sb);