diff options
Diffstat (limited to 'fs/ubifs/log.c')
-rw-r--r-- | fs/ubifs/log.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c index a902c5919e42..a47ddfc9be6b 100644 --- a/fs/ubifs/log.c +++ b/fs/ubifs/log.c | |||
@@ -240,6 +240,7 @@ int ubifs_add_bud_to_log(struct ubifs_info *c, int jhead, int lnum, int offs) | |||
240 | 240 | ||
241 | if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { | 241 | if (c->lhead_offs > c->leb_size - c->ref_node_alsz) { |
242 | c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); | 242 | c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); |
243 | ubifs_assert(c->lhead_lnum != c->ltail_lnum); | ||
243 | c->lhead_offs = 0; | 244 | c->lhead_offs = 0; |
244 | } | 245 | } |
245 | 246 | ||
@@ -404,15 +405,14 @@ int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum) | |||
404 | /* Switch to the next log LEB */ | 405 | /* Switch to the next log LEB */ |
405 | if (c->lhead_offs) { | 406 | if (c->lhead_offs) { |
406 | c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); | 407 | c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); |
408 | ubifs_assert(c->lhead_lnum != c->ltail_lnum); | ||
407 | c->lhead_offs = 0; | 409 | c->lhead_offs = 0; |
408 | } | 410 | } |
409 | 411 | ||
410 | if (c->lhead_offs == 0) { | 412 | /* Must ensure next LEB has been unmapped */ |
411 | /* Must ensure next LEB has been unmapped */ | 413 | err = ubifs_leb_unmap(c, c->lhead_lnum); |
412 | err = ubifs_leb_unmap(c, c->lhead_lnum); | 414 | if (err) |
413 | if (err) | 415 | goto out; |
414 | goto out; | ||
415 | } | ||
416 | 416 | ||
417 | len = ALIGN(len, c->min_io_size); | 417 | len = ALIGN(len, c->min_io_size); |
418 | dbg_log("writing commit start at LEB %d:0, len %d", c->lhead_lnum, len); | 418 | dbg_log("writing commit start at LEB %d:0, len %d", c->lhead_lnum, len); |