diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-09 16:14:08 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-11 15:56:43 -0800 |
commit | 1663cae48ce3ce991c0e3f1a6fbdbd57f3dce9af (patch) | |
tree | ba74cad4dbf08467e5c9bdc62f5f5ad0275a7779 /fs/f2fs | |
parent | 42190d2a8663f3e181894dc4e37a1af06aab2cbb (diff) | |
download | linux-1663cae48ce3ce991c0e3f1a6fbdbd57f3dce9af.tar.gz linux-1663cae48ce3ce991c0e3f1a6fbdbd57f3dce9af.tar.bz2 linux-1663cae48ce3ce991c0e3f1a6fbdbd57f3dce9af.zip |
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: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index c091b757bda6..342597a5897f 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -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; } |