Commit 47e151c0 authored by Colin Ian King's avatar Colin Ian King Committed by Xie XiuQi
Browse files

ext4: unsigned int compared against zero



mainline inclusion
from mainline-5.2-rc1
commit fbbbbd2f
category: bugfix
bugzilla: 16402
CVE: NA
---------------------------

There are two cases where u32 variables n and err are being checked
for less than zero error values, the checks is always false because
the variables are not signed. Fix this by making the variables ints.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 345c0dbf ("ext4: protect journal inode's blocks using block_validity")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>

Signed-off-by: default avataryangerkun <yangerkun@huawei.com>
Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 3ddd4d87
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment