OSDN Git Service

f2fs: fix potential overflow when adjusting GC cycle
authorChao Yu <yuchao0@huawei.com>
Mon, 7 Aug 2017 15:12:46 +0000 (23:12 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 21 Sep 2017 21:11:56 +0000 (14:11 -0700)
commit3ba499e5fa949b7711d45b8957c670029adf51c5
tree02732d1c7af8f3614f15a2e68dceed4f6cfa1a3d
parent3f42e75b2df897eeaac4f5c8c38d2c072499753a
f2fs: fix potential overflow when adjusting GC cycle

While comparing signed and unsigned variables, compiler will converts the
signed value to unsigned one, due to this reason, {in,de}crease_sleep_time
may return overflowed result.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c
fs/f2fs/gc.h
include/trace/events/f2fs.h