]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
f2fs: avoid race condition for shrinker count
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 6 Nov 2020 21:22:05 +0000 (13:22 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 8 Jan 2021 11:25:24 +0000 (12:25 +0100)
commit0884fd2202a2b0a055778e23d2b936aaaad3c4b3
treed4820a3e24e774422be0c37e2999c3b8cb01979d
parent065aa28cafe9c5ddab38790ecc2ffaf31cd655ed
f2fs: avoid race condition for shrinker count

BugLink: https://bugs.launchpad.net/bugs/1910742
[ Upstream commit a95ba66ac1457b76fe472c8e092ab1006271f16c ]

Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in
wrong do_shinker work. Let's avoid to return insane overflowed value by adding
single tracking value.

Reported-by: Light Hsieh <Light.Hsieh@mediatek.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/f2fs/checkpoint.c
fs/f2fs/debug.c
fs/f2fs/f2fs.h
fs/f2fs/node.c
fs/f2fs/node.h
fs/f2fs/shrinker.c