Blame SOURCES/0027-RHEL-7-daemon-umount-all-Hack-to-avoid-umount-sysroo.patch

5c13d3
From 5e9b9fbba8b3f98cdf0abb0dbf8b30e12cc70709 Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Thu, 23 Jul 2015 18:15:36 -0400
ffd6ed
Subject: [PATCH] RHEL 7: daemon: umount-all: Hack to avoid umount: /sysroot:
ffd6ed
 target is busy (RHBZ#1246032).
ffd6ed
ffd6ed
This bug is not properly understood (although readily reproducible).
ffd6ed
However this hack makes it go away for now.
ffd6ed
ffd6ed
https://bugzilla.redhat.com/show_bug.cgi?id=1246032
ffd6ed
---
ffd6ed
 daemon/mount.c | 5 +++++
ffd6ed
 1 file changed, 5 insertions(+)
ffd6ed
ffd6ed
diff --git a/daemon/mount.c b/daemon/mount.c
97ae69
index 61ce64449..b038a89c3 100644
ffd6ed
--- a/daemon/mount.c
ffd6ed
+++ b/daemon/mount.c
90a56e
@@ -28,6 +28,8 @@
ffd6ed
 #include <sys/types.h>
ffd6ed
 #include <mntent.h>
ffd6ed
 
ffd6ed
+#include "ignore-value.h"
ffd6ed
+
ffd6ed
 #include "daemon.h"
ffd6ed
 #include "actions.h"
ffd6ed
 
97ae69
@@ -306,6 +308,9 @@ do_umount_all (void)
ffd6ed
   if (mounts.size > 0)
ffd6ed
     qsort (mounts.argv, mounts.size, sizeof (char *), compare_longest_first);
ffd6ed
 
ffd6ed
+  /* Hack to work around RHBZ#1246032. */
ffd6ed
+  ignore_value (system ("lsof /sysroot"));
ffd6ed
+
ffd6ed
   /* Unmount them. */
ffd6ed
   for (i = 0; i < mounts.size; ++i) {
ffd6ed
     CLEANUP_FREE char *err = NULL;
ffd6ed
-- 
a034fe
2.21.0
ffd6ed