commit | 35d33b245bee24d5bebe7bccab928f7eba1a7b74 | [log] [tgz] |
---|---|---|
author | Nikita Ioffe <ioffe@google.com> | Thu Apr 16 21:37:03 2020 +0100 |
committer | Nikita Ioffe <ioffe@google.com> | Thu Apr 16 21:37:03 2020 +0100 |
tree | 58f467e4fcc930c0e072bd835b6e3b8eea57cf85 | |
parent | 8056ce190c16a90254da99e11e9478f66ab18574 [diff] |
Cleanup logic in KillZramBackingDevice Since this function is used in userspace reboot, we need to be more diligent with error handling, e.g.: * If init fails to read /sys/block/zram0/backing_dev, then fail and fallback to hard reboot. * Always call swapoff. * Always reset zram. * Tear down loop device only if zram is backed by a loop device. Test: adb reboot userspace Bug: 153917129 Change-Id: I4709da1d08cf427ad9c898cfb2506b6a29f1d680