]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: unsigned int compared against zero
authorColin Ian King <colin.king@canonical.com>
Sat, 11 May 2019 02:06:38 +0000 (22:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 11 May 2019 02:06:38 +0000 (22:06 -0400)
commit4bc93c7b83863e89dc9bedf72c6beeaa9447167f
treee8aaa7d407923741c2dd3a307bb658aa66edc922
parent3d079bc6219cb6728d12a138d84f1f01118c7932
ext4: unsigned int compared against zero

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: af3623a536a3 ("ext4: protect journal inode's blocks using block_validity")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/block_validity.c