From 2f3b9fcfeceb3ac9daa5826c1c2c40e53b0432cf Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 25 Jul 2008 16:39:44 +0300 Subject: [PATCH] --- yaml --- r: 108549 b: refs/heads/master c: 0010f18afc5f8ba25e1d20e3165894c32a65af02 h: refs/heads/master i: 108547: 84b07d88b4ff086a864d773560a09e8a15887ce0 v: v3 --- [refs] | 2 +- trunk/fs/ubifs/tnc_commit.c | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index 36f62b1b1e08..145681059fd1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b364b41aeb0289be402be83eebca92eb90bfcb8b +refs/heads/master: 0010f18afc5f8ba25e1d20e3165894c32a65af02 diff --git a/trunk/fs/ubifs/tnc_commit.c b/trunk/fs/ubifs/tnc_commit.c index 8117e65ba2e9..8ac76b1c2d55 100644 --- a/trunk/fs/ubifs/tnc_commit.c +++ b/trunk/fs/ubifs/tnc_commit.c @@ -372,26 +372,25 @@ static int layout_in_gaps(struct ubifs_info *c, int cnt) written = layout_leb_in_gaps(c, p); if (written < 0) { err = written; - if (err == -ENOSPC) { - if (!dbg_force_in_the_gaps_enabled) { - /* - * Do not print scary warnings if the - * debugging option which forces - * in-the-gaps is enabled. - */ - ubifs_err("out of space"); - spin_lock(&c->space_lock); - dbg_dump_budg(c); - spin_unlock(&c->space_lock); - dbg_dump_lprops(c); - } - /* Try to commit anyway */ - err = 0; - break; + if (err != -ENOSPC) { + kfree(c->gap_lebs); + c->gap_lebs = NULL; + return err; } - kfree(c->gap_lebs); - c->gap_lebs = NULL; - return err; + if (!dbg_force_in_the_gaps_enabled) { + /* + * Do not print scary warnings if the debugging + * option which forces in-the-gaps is enabled. + */ + ubifs_err("out of space"); + spin_lock(&c->space_lock); + dbg_dump_budg(c); + spin_unlock(&c->space_lock); + dbg_dump_lprops(c); + } + /* Try to commit anyway */ + err = 0; + break; } p++; cnt -= written;