struct mdinfo *cc = NULL;
struct mdstat_ent *mdstat = NULL;
int cfd = -1;
- int fd2 = -1;
+ int fd2;
dprintf("Grow continue from command line called for %s\n",
devname);
continue;
err = st->ss->load_super(st, fd2, NULL);
close(fd2);
- /* invalidate fd2 to avoid possible double close() */
- fd2 = -1;
if (err)
continue;
break;
sysfs_init(content, fd2, mdstat->devnm);
close(fd2);
- fd2 = -1;
/* start mdmon in case it is not running
*/
ret_val = Grow_continue(fd, st, content, backup_file, 1, 0);
Grow_continue_command_exit:
- if (fd2 > -1)
- close(fd2);
if (cfd > -1)
close(cfd);
st->ss->free_super(st);