Skip to content
Commit f97fcad3 authored by NeilBrown's avatar NeilBrown
Browse files

md: remove need for mddev_lock() in md_seq_show()



The only access in md_seq_show that could suffer from races
not protected by ->lock is walking the rdev list.
This can receive sufficient protection from 'rcu'.

So use rdev_for_each_rcu() and get rid of mddev_lock().

Now reading /proc/mdstat will never block in md_seq_show.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 978a7a47
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