mm/zswap: refactor the get/put routines