mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-26 18:16:26 +00:00
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: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
978a7a47ca
commit
f97fcad38f
1 changed files with 3 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue