Merge "KillZramBackingDevice: Return immediately if backing_dev is none." am: 7e2d32bc06
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1710548 Change-Id: I6afe6758f30d4ee63e85cf56fe2a6f3962b2f090
This commit is contained in:
commit
4c21150d8d
1 changed files with 5 additions and 0 deletions
|
|
@ -478,6 +478,11 @@ static Result<void> KillZramBackingDevice() {
|
|||
// cut the last "\n"
|
||||
backing_dev.erase(backing_dev.length() - 1);
|
||||
|
||||
if (android::base::StartsWith(backing_dev, "none")) {
|
||||
LOG(INFO) << "No zram backing device configured";
|
||||
return {};
|
||||
}
|
||||
|
||||
// shutdown zram handle
|
||||
Timer swap_timer;
|
||||
LOG(INFO) << "swapoff() start...";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue