summaryrefslogtreecommitdiff
path: root/cmds-device.c
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2015-10-26 18:28:19 +0800
committerDavid Sterba <dsterba@suse.com>2015-11-02 09:35:07 +0100
commitda34dbd14936a4c6183be14b7db09f0d6e49cf09 (patch)
tree99913ee45b3b13e48eff2d321811d60454e54b42 /cmds-device.c
parent30fd6f2e92695c355c8f76b8887cd4fade60cdac (diff)
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>
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/cmds-device.c b/cmds-device.c
index e461aa12..c2f3a408 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -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;
}