diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-06-29 16:22:16 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-07-19 08:54:25 +0200 |
commit | f1cb705accc70ac327de2108ecf07b300e03fc42 (patch) | |
tree | fa6d96338de7b5ca284d51853e8d58b9b66b4b06 /fs/ubifs/log.c | |
parent | UBIFS: remove mst_mutex (diff) | |
download | linux-f1cb705accc70ac327de2108ecf07b300e03fc42.tar.xz linux-f1cb705accc70ac327de2108ecf07b300e03fc42.zip |
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/log.c')
-rw-r--r-- | fs/ubifs/log.c | 10 |
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) 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); |