Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e71d1a59 authored by wang.bo116@zte.com.cn's avatar wang.bo116@zte.com.cn Committed by Artem Bityutskiy
Browse files

UBIFS: remove unnecessary code in ubifs_garbage_collect



In ubifs_garbage_collect,local variable "space_before" calculate twice. In
fact, at the beginning of the loop, there is no need to calculate this
variable. Calculate it before call "ubifs_garbage_collect_leb" is enough. This
patch just remove the unnecessary calculate code.

Signed-off-by: default avatarwang bo <wang.bo116@zte.com.cn>
Acked-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent c23e9b75
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -668,8 +668,7 @@ int ubifs_garbage_collect(struct ubifs_info *c, int anyway)
	ubifs_assert(!wbuf->used);

	for (i = 0; ; i++) {
		int space_before = c->leb_size - wbuf->offs - wbuf->used;
		int space_after;
		int space_before, space_after;

		cond_resched();