summaryrefslogtreecommitdiffstats
path: root/Examine.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-01-24 21:56:53 +0100
committerNeilBrown <neilb@suse.de>2011-01-24 21:56:53 +0100
commit1cc7f4feb9a979fdf7ac4bb06e5632b065d4f4d9 (patch)
treeab73ac81e3c55388d07589401bdb6c3e6e2b33e7 /Examine.c
parentFix up analysis of reshape from RAID1 to RAID5. (diff)
downloadmdadm-1cc7f4feb9a979fdf7ac4bb06e5632b065d4f4d9.tar.xz
mdadm-1cc7f4feb9a979fdf7ac4bb06e5632b065d4f4d9.zip
Don't close fds in write_init_super
We previously closed all 'fds' associated with an array in write_init_super .. sometimes, and sometimes at bad times. This isn't neat and free_super is a better place to close them. So make sure free_super always closes the fds that the metadata manager kept hold of, and stop closing them in write_init_super. Also add a few more calls to free_super to make sure they really do get closed. Reported-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Examine.c')
-rw-r--r--Examine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Examine.c b/Examine.c
index ffca9ca5..f949646f 100644
--- a/Examine.c
+++ b/Examine.c
@@ -145,6 +145,7 @@ int Examine(struct mddev_dev *devlist, int brief, int export, int scan,
} else if (export) {
if (st->ss->export_examine_super)
st->ss->export_examine_super(st);
+ st->ss->free_super(st);
} else {
printf("%s:\n",devlist->devname);
st->ss->examine_super(st, homehost);