btrfs-progs: image: close all_devices at the end
authorZhao Lei <zhaolei@cn.fujitsu.com>
Wed, 9 Sep 2015 13:32:23 +0000 (21:32 +0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 11 Sep 2015 15:03:39 +0000 (17:03 +0200)
Devices opened by check_mounted() in main() should closed before
the exit of btrfs-image.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
btrfs-image.c

index 551487f..82eed05 100644 (file)
@@ -2881,5 +2881,7 @@ out:
                }
        }
 
+       btrfs_close_all_devices();
+
        return !!ret;
 }