From: NeilBrown Date: Mon, 15 Dec 2014 01:56:58 +0000 (+1100) Subject: md: protect ->pers changes with mddev->lock X-Git-Tag: fixes-v4.0-rc1~120^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36d091f4759d194c99f0705d412afe208622b45a;p=pandora-kernel.git md: protect ->pers changes with mddev->lock ->pers is already protected by ->reconfig_mutex, and cannot possibly change when there are threads running or outstanding IO. However there are some places where we access ->pers not in a thread or IO context, and where ->reconfig_mutex is unnecessarily heavy-weight: level_show and md_seq_show(). So protect all changes, and those accesses, with ->lock. This is a step toward taking those accesses out from under reconfig_mutex. [Fixed missing "mddev->pers" -> "pers" conversion, thanks to Dan Carpenter ] Signed-off-by: NeilBrown --- Reading git-diff-tree failed