Hello.
There is a possible bug in f2fs_truncate_inode_blocks():
if (err < 0 && err != -ENOENT)
goto fail;
...
offset[1] = 0;
offset[0]++;
nofs += err;
If err = -ENOENT then nofs will sum with an error code,
which is strange behaviour.
Cast expression type to unsigned long in __count_extent_cache()
to prevent integer overflow.
Found by Linux Verification Center (linuxtesting.org) with Svace.
Signed-off-by: Roman Smirnov
Reviewed-by: Sergey Shtylyov
---
fs/f2fs/shrinker.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion