Skip to content

Commit

Permalink
compose: fix bad umount
Browse files Browse the repository at this point in the history
Closes: coreos#602

Closes: coreos#620
Approved by: cgwalters
  • Loading branch information
jlebon authored and rh-atomic-bot committed Feb 10, 2017
1 parent dd4b553 commit 3c77b6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/rpmostree-compose-builtin-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,11 +984,13 @@ rpmostree_compose_builtin_tree (int argc,

g_free (self->ref);

/* Move back out of the workding directory to ensure unmount works */
/* Move back out of the workding directory and close all fds pointing
* to it ensure unmount works */
(void )chdir ("/");

if (self->workdir_dfd != -1)
(void) close (self->workdir_dfd);
if (rootfs_fd != -1)
(void) close (rootfs_fd);

if (workdir_is_tmp)
{
Expand Down

0 comments on commit 3c77b6e

Please sign in to comment.