diff mbox

[3/3] btrfs-progs: close all_devices for btrfs-image

Message ID fbf4df28568fcc87e5e6ae264eef0247eaa63a38.1441805445.git.zhaolei@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhaolei Sept. 9, 2015, 1:32 p.m. UTC
devices opened by check_mounted() in main() should close before
exit of btrfs-image.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 btrfs-image.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/btrfs-image.c b/btrfs-image.c
index c7681f4..78ae828 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -2881,5 +2881,7 @@  out:
 		}
 	}
 
+	btrfs_close_all_devices();
+
 	return !!ret;
 }