summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-22 18:22:52 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-22 18:22:52 +0000
commitd9cd16e9eeeef1c22e86a55a4b657caf030bd996 (patch)
tree76e6f9b8e55197af1e0773496ddb6bf470a7f11e
parent0d893760620ec8975944cfaf601d8283ed36b97a (diff)
parentbaee102002073e746756840dac1dcb6f03d3dfe5 (diff)
downloadvold-android13-frc-ipsec-release.tar.gz
Snap for 8627648 from baee102002073e746756840dac1dcb6f03d3dfe5 to tm-frc-ipsec-releaset_frc_ips_330443010android13-frc-ipsec-release
Change-Id: Id33f9c5d980988da9c57144c4f6a6bc614525d83
-rw-r--r--IdleMaint.cpp10
-rw-r--r--VolumeManager.cpp4
2 files changed, 9 insertions, 5 deletions
diff --git a/IdleMaint.cpp b/IdleMaint.cpp
index 2bfe3d9a..426be58f 100644
--- a/IdleMaint.cpp
+++ b/IdleMaint.cpp
@@ -450,17 +450,17 @@ int RunIdleMaint(bool needGC, const android::sp<android::os::IVoldTaskListener>&
stopGc(paths);
}
+ if (!gc_aborted) {
+ Trim(nullptr);
+ runDevGc();
+ }
+
lk.lock();
idle_maint_stat = IdleMaintStats::kStopped;
lk.unlock();
cv_stop.notify_one();
- if (!gc_aborted) {
- Trim(nullptr);
- runDevGc();
- }
-
if (listener) {
android::os::PersistableBundle extras;
listener->onFinished(0, extras);
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index bc556ef0..a7d39c11 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -914,6 +914,10 @@ int VolumeManager::reset() {
updateVirtualDisk();
mAddedUsers.clear();
mStartedUsers.clear();
+
+ // Abort all FUSE connections to avoid deadlocks if the FUSE daemon was killed
+ // with FUSE fds open.
+ abortFuse();
return 0;
}