mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: Adrian Hunter <ext-adrian.hunter@nokia.com>,
	Zoltan Sogor <weth@inf.u-szeged.hu>,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH] UBIFS: minor tweaks in commit
Date: Wed, 13 Aug 2008 13:17:50 +0300	[thread overview]
Message-ID: <1218622675-28853-22-git-send-email-dedekind@infradead.org> (raw)
In-Reply-To: <1218622675-28853-1-git-send-email-dedekind@infradead.org>

From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

No functional changes, just lessen the amount of indentations.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ubifs/tnc_commit.c |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c
index 8117e65..8ac76b1 100644
--- a/fs/ubifs/tnc_commit.c
+++ b/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;
-- 
1.5.4.1


  parent reply	other threads:[~2008-08-13  8:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13 10:17 UBIFS updates for 2.6.27 Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] Documentation: fix typo in ubifs.txt Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: print volume name as well Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix budgeting calculations Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve debugging Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: free budget in delete_inode as well Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix error return in failure mode Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: ensure UBIFS switches to read-only on error Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: make ubifs_ro_mode() not inline Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: do not write orphans back Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: remove unneeded function parameter Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: remove another " Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: increment commit number earlier Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: optimize deletions Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: do not union creat_sqnum and del_cmtno Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix typos in comments Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: correct orphan deletion order Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve budgeting checks Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: align inode data to eight Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: print pid in dump function Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: reserve more space for index Artem Bityutskiy
2008-08-13 10:17 ` Artem Bityutskiy [this message]
2008-08-13 10:17 ` [PATCH] UBIFS: support splice_write Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: correct spelling of "thrice" Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: always set i_generation to 0 Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve arguments checking in debugging messages Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix budgeting request alignment in xattr code Artem Bityutskiy
2008-08-14 19:27 ` UBIFS updates for 2.6.27 Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1218622675-28853-22-git-send-email-dedekind@infradead.org \
    --to=dedekind@infradead.org \
    --cc=ext-adrian.hunter@nokia.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weth@inf.u-szeged.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®