]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Don't close fds in write_init_super
authorNeilBrown <neilb@suse.de>
Mon, 24 Jan 2011 20:56:53 +0000 (07:56 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 24 Jan 2011 20:56:53 +0000 (07:56 +1100)
commit1cc7f4feb9a979fdf7ac4bb06e5632b065d4f4d9
treeab73ac81e3c55388d07589401bdb6c3e6e2b33e7
parent446d2a5ad48671be2e23676d9ea93af1b8dddf0b
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>
Examine.c
Manage.c
super-ddf.c
super-intel.c
super0.c
super1.c