From: NeilBrown Date: Mon, 15 Dec 2014 01:56:59 +0000 (+1100) Subject: md: remove need for mddev_lock() in md_seq_show() X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~104^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f97fcad38f2ecf2e34b6f0ab93f74f2978dbe008;p=pandora-kernel.git 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 --- Reading git-diff-tree failed