Skip to content
Commit b1211978 authored by Jonathan Derrick's avatar Jonathan Derrick Committed by Song Liu
Browse files

md: Fix bitmap offset type in sb writer



Bitmap offset is allowed to be negative, indicating that bitmap precedes
metadata. Change the type back from sector_t to loff_t to satisfy
conditionals and calculations.

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/linux-raid/CAPhsuW6HuaUJ5WcyPajVgUfkQFYp2D_cy1g6qxN4CU_gP2=z7g@mail.gmail.com/
Fixes: 10172f20

 ("md: Fix types in sb writer")
Signed-off-by: default avatarJonathan Derrick <jonathan.derrick@linux.dev>
Suggested-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230425011438.71046-1-jonathan.derrick@linux.dev
parent fc05e06e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment