UBIFS: remove unnecessary check
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Sun, 29 Jun 2014 14:22:16 +0000 (17:22 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Sat, 19 Jul 2014 06:54:25 +0000 (09:54 +0300)
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>
fs/ubifs/log.c

index a902c59..518b136 100644 (file)
@@ -407,12 +407,10 @@ int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum)
                c->lhead_offs = 0;
        }
 
-       if (c->lhead_offs == 0) {
-               /* Must ensure next LEB has been unmapped */
-               err = ubifs_leb_unmap(c, c->lhead_lnum);
-               if (err)
-                       goto out;
-       }
+       /* Must ensure next LEB has been unmapped */
+       err = ubifs_leb_unmap(c, c->lhead_lnum);
+       if (err)
+               goto out;
 
        len = ALIGN(len, c->min_io_size);
        dbg_log("writing commit start at LEB %d:0, len %d", c->lhead_lnum, len);