]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
FIX: Arrays cannot be opened exclusively
authorAdam Kwolek <adam.kwolek@intel.com>
Mon, 17 Jan 2011 04:06:02 +0000 (15:06 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 17 Jan 2011 04:06:02 +0000 (15:06 +1100)
When reshaping it is correct to open containers exclusively, but not
arrays.  The array could very easily be in use, e.g. by a mounted
filesystem.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index df736eda321004efed2d24266603bbb384717e0e..23ef88ee67e1e3f26f998d1874898a979cb274b7 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -2121,7 +2121,7 @@ int reshape_container(char *container, int cfd, char *devname,
                if (!content)
                        break;
 
-               fd = open_dev_excl(mdstat->devnum);
+               fd = open_dev(mdstat->devnum);
                if (fd < 0)
                        break;
                adev = map_dev(dev2major(mdstat->devnum),