From 339466142b3f58fe0ee4dea7e8c5f3d33099e89c Mon Sep 17 00:00:00 2001 From: Tristan Lelong Date: Mon, 19 Nov 2012 16:16:15 -0800 Subject: [PATCH] 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 --- fs/logfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.5