md: use mddev->lock to protect updates to resync_{min,max}.
authorNeilBrown <neilb@suse.de>
Mon, 15 Dec 2014 01:57:01 +0000 (12:57 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 5 Feb 2015 22:32:56 +0000 (09:32 +1100)
commit23da422b1951cb8dbcb7c3090057cb6d5ceedf49
treea8ee30585883d85d661faf1cb21aa0baddff62c7
parent1b30e66f5acc6bf22fff49d4093cf17454f914b7
md: use mddev->lock to protect updates to resync_{min,max}.

There are interdependencies between these two sysfs attributes
and whether a resync is currently running.

Rather than depending on reconfig_mutex to ensure no races when
testing these interdependencies are met, use the spinlock.
This will allow the mutex to be remove from protecting this
code in a subsequent patch.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c
drivers/md/md.h