]> git.ipfire.org Git - thirdparty/mdadm.git/commit - sysfs.c
sysfs: fixed sysfs_freeze_array array to work properly with Manage_subdevs.
authorNeilBrown <neilb@suse.de>
Wed, 28 Mar 2012 06:29:37 +0000 (17:29 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 28 Mar 2012 06:29:37 +0000 (17:29 +1100)
commitfd324b08dbfa8404558534dd0a2321213ffb7257
tree12560243fa455d195c85340176b99a22f2d8a632
parent2d762ade6ae1018f18aef046f3af179517199d51
sysfs: fixed sysfs_freeze_array array to work properly with Manage_subdevs.

If the array is already frozen when Manage_subdevs is called we don't
want it to unfreeze the array.
This is because Grow calls Manage_subdevs to add devices to an array
being reshaped, and the array must stay frozen over this call.

So if sysfs_freeze_array find the array to be frozen it returns '0',
meaning that it didn't and cannot freeze it.  Then the caller will not
try to unfreeze, which is good.

Signed-off-by: NeilBrown <neilb@suse.de>
sysfs.c