Skip to content

Commit

Permalink
f2fs: fix wrong memory condition check
Browse files Browse the repository at this point in the history
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: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Jaegeuk Kim committed Jan 11, 2016
1 parent 42190d2 commit 1663cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type)
sizeof(struct extent_node)) >> PAGE_CACHE_SHIFT;
res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 1);
} else {
if (sbi->sb->s_bdi->wb.dirty_exceeded)
return false;
if (!sbi->sb->s_bdi->wb.dirty_exceeded)
return true;
}
return res;
}
Expand Down

0 comments on commit 1663cae

Please sign in to comment.