From: Tristan Lelong Date: Tue, 20 Nov 2012 00:16:15 +0000 (-0800) Subject: Fix the call to BUG() caused by no free segment found X-Git-Tag: next-20121205~106^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=339466142b3f58fe0ee4dea7e8c5f3d33099e89c;p=karo-tx-linux.git Fix the call to BUG() caused by no free segment found 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 Signed-off-by: Prasad Joshi --- diff --git a/fs/logfs/super.c b/fs/logfs/super.c index 345c24b8a6f8..e726eb1f36ef 100644 --- a/fs/logfs/super.c +++ b/fs/logfs/super.c @@ -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);