Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cd7dba98 authored by Can Guo's avatar Can Guo
Browse files

mmc: core: fix queue clean up sequence when SD card is removed



When SD card is removed from the slot, there could still be requests reside
in its queue's elevator. Usually, the driver shall call mmc_blk_remove to
clean up all the requests in its request queue, later VFS layer would call
mmc_blk_release to drain all the requests in the elevator to request queue
and clean up them once again. In some extreme scenarios, in which SD card
is repeatedly inserted and removed rapidly, mmc_blk_release may has no
chance to be called. If so, the requests reside in the elevator are left
not handled, thus user layer processes which are pending on the requests
may hang up.
This change fixes it by putting the request queue draining action into
mmc_blk_remove, so that the request queue and its elevator always got
cleaned up once the SD card is removed.

Change-Id: Id408fca2e038bf0bfecdbbc4002b7d0e2c8dc196
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 85403480
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment