mm: swap: fix value of SWP_FAST

SWP_FAST was added to optimize swap usage of zram like fast
swap devices. But its value is greater than SWAP_SCANNING
which is used for refcounting swap map access. This results in
swapoff of the device being blocked forever in a loop waiting
for swap map accesses to complete, by checking the value of
SWAP_SCANNING.

Change-Id: Ibdc07e706c59b6f541708cdb0e28a02c15cfaade
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
Vinayak Menon 2015-04-15 14:42:34 -07:00
parent 19d85ae5a5
commit 94f91186ca

View file

@ -152,9 +152,9 @@ enum {
SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */
SWP_BLKDEV = (1 << 6), /* its a block device */
SWP_FILE = (1 << 7), /* set after swap_activate success */
SWP_FAST = (1 << 8), /* blkdev access is fast and cheap */
/* add others here before... */
SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */
SWP_FAST = (1 << 9), /* blkdev access is fast and cheap */
SWP_SCANNING = (1 << 9), /* refcount in scan_swap_map */
};
#define SWAP_CLUSTER_MAX 32UL