aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-06-29 10:22:16 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-07-19 02:54:25 -0400
commitf1cb705accc70ac327de2108ecf07b300e03fc42 (patch)
treefa6d96338de7b5ca284d51853e8d58b9b66b4b06 /fs/ubifs
parent07e19dff63e3d5d6500d831e36554ac9b1b0560e (diff)
UBIFS: remove unnecessary check
Remove the "if (c->lhead_offs == 0)" check because is unnecessary, since at that point the log head offset is guaranteed to be zero due to the previous operation. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/log.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c
index a902c5919e42..518b13685b2a 100644
--- a/fs/ubifs/log.c
+++ b/fs/ubifs/log.c
@@ -407,12 +407,10 @@ int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum)
407 c->lhead_offs = 0; 407 c->lhead_offs = 0;
408 } 408 }
409 409
410 if (c->lhead_offs == 0) { 410 /* Must ensure next LEB has been unmapped */
411 /* Must ensure next LEB has been unmapped */ 411 err = ubifs_leb_unmap(c, c->lhead_lnum);
412 err = ubifs_leb_unmap(c, c->lhead_lnum); 412 if (err)
413 if (err) 413 goto out;
414 goto out;
415 }
416 414
417 len = ALIGN(len, c->min_io_size); 415 len = ALIGN(len, c->min_io_size);
418 dbg_log("writing commit start at LEB %d:0, len %d", c->lhead_lnum, len); 416 dbg_log("writing commit start at LEB %d:0, len %d", c->lhead_lnum, len);