btrfs-progs: Remove all btrfs_close_all_devices in sub-command

Since we have btrfs_close_all_devices() in btrfs's main entrance,
it is not necessary to call btrfs_close_all_devices() separately
in each sub-command.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Zhao Lei 2015-10-26 18:28:19 +08:00 committed by David Sterba
parent 30fd6f2e92
commit da34dbd149
3 changed files with 0 additions and 6 deletions

View File

@ -9735,7 +9735,6 @@ out:
free_root_recs_tree(&root_cache);
close_out:
close_ctree(root);
btrfs_close_all_devices();
err_out:
if (ctx.progress_enabled)
task_deinit(ctx.info);

View File

@ -138,7 +138,6 @@ static int cmd_device_add(int argc, char **argv)
error_out:
close_file_or_dir(fdmnt, dirstream);
btrfs_close_all_devices();
return !!ret;
}
@ -287,7 +286,6 @@ static int cmd_device_scan(int argc, char **argv)
}
out:
btrfs_close_all_devices();
return !!ret;
}
@ -456,7 +454,6 @@ static int cmd_device_stats(int argc, char **argv)
out:
free(di_args);
close_file_or_dir(fdmnt, dirstream);
btrfs_close_all_devices();
return err;
}

View File

@ -309,7 +309,6 @@ static int cmd_replace_start(int argc, char **argv)
}
}
close_file_or_dir(fdmnt, dirstream);
btrfs_close_all_devices();
return 0;
leave_with_error:
@ -319,7 +318,6 @@ leave_with_error:
close(fdmnt);
if (fddstdev != -1)
close(fddstdev);
btrfs_close_all_devices();
return 1;
}