summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/volumes.c b/volumes.c
index d3eeaf93..0a9ee02c 100644
--- a/volumes.c
+++ b/volumes.c
@@ -148,7 +148,8 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
list_for_each(cur, head) {
device = list_entry(cur, struct btrfs_device, dev_list);
- device->fd = 0;
+ close(device->fd);
+ device->fd = -1;
}
return 0;
}