Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
md/raid10: fix: incompatible types in comparison expression (differen…
…t address spaces). Fixes the following sparse errors in drivers/md/raid10.c error: incompatible types in comparison expression (different address spaces). The error was because of the following line in function read_balance(): rdev = rcu_dereference(conf->mirrors[disk].replacement); if (rdev == NULL || test_bit(Faulty, &rdev->flags) || r10_bio->devs[slot].addr + sectors > rdev->recovery_offset) rdev = rcu_dereference(conf->mirrors[disk].rdev); Annotating the struct md_rdev *rdev and *replacement in drivers/md/raid10.h with __rcu fixes the sparse error. Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com> Reported-by: Abaci <abaci@linux.alibaba.com>
- Loading branch information