summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/journal.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-03-06 08:37:46 -0700
committerJens Axboe <axboe@fb.com>2015-07-11 09:57:32 -0600
commit77b5a08427e87514c33730afc18cd02c9475e2c3 (patch)
treeb0d325533280f47253871044e875c0f71a369896 /drivers/md/bcache/journal.c
parent06b285bd11257bccc5a1b85a835507e33656aff2 (diff)
downloadlinux-77b5a08427e87514c33730afc18cd02c9475e2c3.tar.bz2
bcache: don't embed 'return' statements in closure macros
This is horribly confusing, it breaks the flow of the code without it being apparent in the caller. Signed-off-by: Jens Axboe <axboe@fb.com> Acked-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/md/bcache/journal.c')
-rw-r--r--drivers/md/bcache/journal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index ce64fc851251..418607a6ba33 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -592,12 +592,14 @@ static void journal_write_unlocked(struct closure *cl)
if (!w->need_write) {
closure_return_with_destructor(cl, journal_write_unlock);
+ return;
} else if (journal_full(&c->journal)) {
journal_reclaim(c);
spin_unlock(&c->journal.lock);
btree_flush_write(c);
continue_at(cl, journal_write, system_wq);
+ return;
}
c->journal.blocks_free -= set_blocks(w->data, block_bytes(c));