diff --git a/Process.cpp b/Process.cpp
index 62d51a2..79fe15d 100644
--- a/Process.cpp
+++ b/Process.cpp
@@ -84,7 +84,7 @@
 }
 
 // TODO: Refactor the code with KillProcessesWithOpenFiles().
-int KillProcessesWithMounts(const std::string& prefix, int signal) {
+int KillProcessesWithTmpfsMounts(const std::string& prefix, int signal) {
     std::unordered_set<pid_t> pids;
 
     auto proc_d = std::unique_ptr<DIR, int (*)(DIR*)>(opendir("/proc"), closedir);
@@ -112,7 +112,8 @@
         // Check if obb directory is mounted, and get all packages of mounted app data directory.
         mntent* mentry;
         while ((mentry = getmntent(fp.get())) != nullptr) {
-            if (android::base::StartsWith(mentry->mnt_dir, prefix)) {
+            if (mentry->mnt_fsname != nullptr && strncmp(mentry->mnt_fsname, "tmpfs", 5) == 0
+                    && android::base::StartsWith(mentry->mnt_dir, prefix)) {
                 pids.insert(pid);
                 break;
             }
diff --git a/Process.h b/Process.h
index a56b9ce..f3728b5 100644
--- a/Process.h
+++ b/Process.h
@@ -21,7 +21,7 @@
 namespace vold {
 
 int KillProcessesWithOpenFiles(const std::string& path, int signal, bool killFuseDaemon = true);
-int KillProcessesWithMounts(const std::string& path, int signal);
+int KillProcessesWithTmpfsMounts(const std::string& path, int signal);
 
 }  // namespace vold
 }  // namespace android
diff --git a/Utils.cpp b/Utils.cpp
index 9ff7920..b353197 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -499,25 +499,25 @@
     return -errno;
 }
 
-status_t KillProcessesWithMountPrefix(const std::string& path) {
-    if (KillProcessesWithMounts(path, SIGINT) == 0) {
+status_t KillProcessesWithTmpfsMountPrefix(const std::string& path) {
+    if (KillProcessesWithTmpfsMounts(path, SIGINT) == 0) {
         return OK;
     }
     if (sSleepOnUnmount) sleep(5);
 
-    if (KillProcessesWithMounts(path, SIGTERM) == 0) {
+    if (KillProcessesWithTmpfsMounts(path, SIGTERM) == 0) {
         return OK;
     }
     if (sSleepOnUnmount) sleep(5);
 
-    if (KillProcessesWithMounts(path, SIGKILL) == 0) {
+    if (KillProcessesWithTmpfsMounts(path, SIGKILL) == 0) {
         return OK;
     }
     if (sSleepOnUnmount) sleep(5);
 
     // Send SIGKILL a second time to determine if we've
     // actually killed everyone mount
-    if (KillProcessesWithMounts(path, SIGKILL) == 0) {
+    if (KillProcessesWithTmpfsMounts(path, SIGKILL) == 0) {
         return OK;
     }
     PLOG(ERROR) << "Failed to kill processes using " << path;
diff --git a/Utils.h b/Utils.h
index 4771593..a3316c3 100644
--- a/Utils.h
+++ b/Utils.h
@@ -78,8 +78,8 @@
 /* Kills any processes using given path */
 status_t KillProcessesUsingPath(const std::string& path);
 
-/* Kills any processes using given mount prifix */
-status_t KillProcessesWithMountPrefix(const std::string& path);
+/* Kills any processes using given tmpfs mount prifix */
+status_t KillProcessesWithTmpfsMountPrefix(const std::string& path);
 
 /* Creates bind mount from source to target */
 status_t BindMount(const std::string& source, const std::string& target);
diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index fe58555..cfb68ba 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -191,7 +191,9 @@
     // umount the whole Android/ dir.
     if (mAppDataIsolationEnabled) {
         std::string appObbDir(StringPrintf("%s/%d/Android/obb", getPath().c_str(), userId));
-        KillProcessesWithMountPrefix(appObbDir);
+        // Here we assume obb/data dirs is mounted as tmpfs, then it must be caused by
+        // app data isolation.
+        KillProcessesWithTmpfsMountPrefix(appObbDir);
     } else {
         std::string androidDataTarget(
                 StringPrintf("/mnt/user/%d/%s/%d/Android/data", userId, label.c_str(), userId));
