aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorXiao Ni <[email protected]>2021-08-18 05:57:48 +0000
committerSong Liu <[email protected]>2021-08-26 16:04:15 +0000
commit46d4703b1db4c86ab5acb2331b10df999f005e8e (patch)
tree322f0fd2d0c863d44d4637ad22809928a763adea /drivers/md/raid1.c
parentnbd: remove nbd->destroy_complete (diff)
downloadkernel-46d4703b1db4c86ab5acb2331b10df999f005e8e.tar.gz
kernel-46d4703b1db4c86ab5acb2331b10df999f005e8e.zip
md/raid10: Remove unnecessary rcu_dereference in raid10_handle_discard
We are seeing the following warning in raid10_handle_discard. [ 695.110751] ============================= [ 695.131439] WARNING: suspicious RCU usage [ 695.151389] 4.18.0-319.el8.x86_64+debug #1 Not tainted [ 695.174413] ----------------------------- [ 695.192603] drivers/md/raid10.c:1776 suspicious rcu_dereference_check() usage! [ 695.225107] other info that might help us debug this: [ 695.260940] rcu_scheduler_active = 2, debug_locks = 1 [ 695.290157] no locks held by mkfs.xfs/10186. In the first loop of function raid10_handle_discard. It already determines which disk need to handle discard request and add the rdev reference count rdev->nr_pending. So the conf->mirrors will not change until all bios come back from underlayer disks. It doesn't need to use rcu_dereference to get rdev. Cc: [email protected] Fixes: d30588b2731f ('md/raid10: improve raid10 discard request') Signed-off-by: Xiao Ni <[email protected]> Acked-by: Guoqing Jiang <[email protected]> Signed-off-by: Song Liu <[email protected]>
Diffstat (limited to 'drivers/md/raid1.c')
0 files changed, 0 insertions, 0 deletions