diff options
author | 2020-08-19 10:34:48 +0900 | |
---|---|---|
committer | 2020-09-08 20:31:33 -0700 | |
commit | 123aaf774f70ba48fb9ab064b6ce75a9b64d7b85 (patch) | |
tree | 2e44c6a19c7af918f74464b51dd26830dd7c7955 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge tag 'linux-kselftest-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest (diff) | |
download | wireguard-linux-123aaf774f70ba48fb9ab064b6ce75a9b64d7b85.tar.xz wireguard-linux-123aaf774f70ba48fb9ab064b6ce75a9b64d7b85.zip |
f2fs: Fix type of section block count variables
Commit da52f8ade40b ("f2fs: get the right gc victim section when section
has several segments") added code to count blocks of each section using
variables with type 'unsigned short', which has 2 bytes size in many
systems. However, the counts can be larger than the 2 bytes range and
type conversion results in wrong values. Especially when the f2fs
sections have blocks as many as USHRT_MAX + 1, the count is handled as 0.
This triggers eternal loop in init_dirty_segmap() at mount system call.
Fix this by changing the type of the variables to block_t.
Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section has several segments")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions