Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305397 > unrolled thread

[PATCH] f2fs: fix wrong memory condition check

Started byJaegeuk Kim <jaegeuk@kernel.org>
First post2016-01-10 01:20 +0100
Last post2016-01-10 01:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] f2fs: fix wrong memory condition check Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-10 01:20 +0100

#1305397 — [PATCH] f2fs: fix wrong memory condition check

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2016-01-10 01:20 +0100
Subject[PATCH] f2fs: fix wrong memory condition check
Message-ID<qPbTI-4Ib-9@gated-at.bofh.it>
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>
---
 fs/f2fs/node.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index c091b75..342597a 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;
 }
-- 
2.6.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web