f2fs: fix to drop all inmem pages correctly
authorChao Yu <yuchao0@huawei.com>
Mon, 15 Jan 2018 09:16:46 +0000 (17:16 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 22 Jan 2018 22:56:47 +0000 (14:56 -0800)
commita2e2e76b23038b187e5656c467ec76eeb29b8275
tree7b9fc292e53d8f08c0313fbe5e4dbb87357c28b5
parentf3d98e74fcddb23dba00a88145272fc8223baaee
f2fs: fix to drop all inmem pages correctly

In commit 57864ae5ce3a ("f2fs: limit # of inmemory pages"), we have
limited memory footprint of all inmem pages with 20% of total memory,
otherwise, if we exceed the threshold, we will try to drop all inmem
pages to avoid excessive memory pressure resulting in performance
regression.

But in some unrelated error paths, we will also drop all inmem pages,
which should be wrong, fix it in this patch.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c