am 46a3a79a: Merge "print information about opened files when failed unmount" into lmp-dev

* commit '46a3a79a8f6b8b8eb66b1194a1a56b0ddcd4943b':
  print information about opened files when failed unmount
diff --git a/Process.cpp b/Process.cpp
index ea5fbc7..08be28e 100644
--- a/Process.cpp
+++ b/Process.cpp
@@ -170,6 +170,10 @@
     return result;
 }
 
+extern "C" void vold_killProcessesWithOpenFiles(const char *path, int action) {
+	Process::killProcessesWithOpenFiles(path, action);
+}
+
 /*
  * Hunt down processes that have files open at the given mount point.
  * action = 0 to just warn,
diff --git a/Process.h b/Process.h
index fc0c0b7..e745ca4 100644
--- a/Process.h
+++ b/Process.h
@@ -17,6 +17,8 @@
 #ifndef _PROCESS_H
 #define _PROCESS_H
 
+#ifdef __cplusplus
+
 class Process {
 public:
     static void killProcessesWithOpenFiles(const char *path, int action);
@@ -32,4 +34,11 @@
     static int pathMatchesMountPoint(const char *path, const char *mountPoint);
 };
 
+extern "C" {
+#endif /* __cplusplus */
+	void vold_killProcessesWithOpenFiles(const char *path, int action);
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff --git a/cryptfs.c b/cryptfs.c
index 32b3c6a..ceb13f0 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -53,6 +53,7 @@
 #include "ext4_utils.h"
 #include "f2fs_sparseblock.h"
 #include "CheckBattery.h"
+#include "Process.h"
 
 #include <hardware/keymaster.h>
 
@@ -1452,6 +1453,7 @@
       SLOGD("unmounting %s succeeded\n", mountpoint);
       rc = 0;
     } else {
+      vold_killProcessesWithOpenFiles(mountpoint, 0);
       SLOGE("unmounting %s failed\n", mountpoint);
       rc = -1;
     }