ubifs: remove unnecessary check in ubifs_log_start_commit
[linux-2.6-microblaze.git] / fs / ubifs / log.c
index 15fd854..b6ac9c4 100644 (file)
@@ -1,21 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * This file is part of UBIFS.
  *
  * Copyright (C) 2006-2008 Nokia Corporation.
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
  * Authors: Artem Bityutskiy (Битюцкий Артём)
  *          Adrian Hunter
  */
@@ -450,10 +438,7 @@ int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum)
        *ltail_lnum = c->lhead_lnum;
 
        c->lhead_offs += len;
-       if (c->lhead_offs == c->leb_size) {
-               c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum);
-               c->lhead_offs = 0;
-       }
+       ubifs_assert(c, c->lhead_offs < c->leb_size);
 
        remove_buds(c);