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

Commit 1663cae4 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: fix wrong memory condition check



This patch fixes wrong decision for avaliable_free_memory.
The return valus is already set as false, so we should consider true condition
below only.

Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 42190d2a
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -71,8 +71,8 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type)
				sizeof(struct extent_node)) >> PAGE_CACHE_SHIFT;
				sizeof(struct extent_node)) >> PAGE_CACHE_SHIFT;
		res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1);
		res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1);
	} else {
	} else {
		if (sbi->sb->s_bdi->wb.dirty_exceeded)
		if (!sbi->sb->s_bdi->wb.dirty_exceeded)
			return false;
			return true;
	}
	}
	return res;
	return res;
}
}