From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>,
Artem Bityutskiy <dedekind1@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-mtd@lists.infradead.org
Subject: [PATCH 2/6 linux-next] ubifs: simplify return in shrink_liability()
Date: Fri, 15 May 2015 23:43:56 +0200 [thread overview]
Message-ID: <1431726240-4675-2-git-send-email-fabf@skynet.be> (raw)
In-Reply-To: <1431726240-4675-1-git-send-email-fabf@skynet.be>
Directly return ubifs_return_leb()
instead of storing value in err and testing it.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/ubifs/budget.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c
index 11a11b3..c07b770 100644
--- a/fs/ubifs/budget.c
+++ b/fs/ubifs/budget.c
@@ -77,7 +77,7 @@ static void shrink_liability(struct ubifs_info *c, int nr_to_write)
*/
static int run_gc(struct ubifs_info *c)
{
- int err, lnum;
+ int lnum;
/* Make some free space by garbage-collecting dirty space */
down_read(&c->commit_sem);
@@ -88,10 +88,7 @@ static int run_gc(struct ubifs_info *c)
/* GC freed one LEB, return it to lprops */
dbg_budg("GC freed LEB %d", lnum);
- err = ubifs_return_leb(c, lnum);
- if (err)
- return err;
- return 0;
+ return ubifs_return_leb(c, lnum);
}
/**
--
2.4.0
next prev parent reply other threads:[~2015-05-15 21:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 21:43 [PATCH 1/6 linux-next] ubifs: remove unnecessary semi-colon Fabian Frederick
2015-05-15 21:43 ` Fabian Frederick [this message]
2015-05-15 21:43 ` [PATCH 3/6 linux-next] ubifs: simplify return in layout_cnodes() Fabian Frederick
2015-05-15 21:43 ` [PATCH 4/6 linux-next] ubifs: simplify return in sort_nodes() Fabian Frederick
2015-05-15 21:43 ` [PATCH 5/6 linux-next] ubifs: remove unnecessary else after break Fabian Frederick
2015-05-19 21:45 ` Brian Norris
2015-05-15 21:44 ` [PATCH 6/6 linux-next] ubifs: remove else after return Fabian Frederick
2015-05-18 22:17 ` Richard Weinberger
2015-05-19 17:42 ` Fabian Frederick
2015-05-19 17:57 ` Richard Weinberger
2015-05-22 21:37 ` Fabian Frederick
2015-05-22 21:46 ` Richard Weinberger
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=1431726240-4675-2-git-send-email-fabf@skynet.be \
--to=fabf@skynet.be \
--cc=adrian.hunter@intel.com \
--cc=dedekind1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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®