• Dmitry Safonov's avatar
    mm: swap: zswap: maybe_preload & refactoring · 5b999aad
    Dmitry Safonov authored
    zswap_get_swap_cache_page and read_swap_cache_async have pretty much the
    same code with only significant difference in return value and usage of
    swap_readpage.
    
    I a helper __read_swap_cache_async() with the common code.  Behavior
    change: now zswap_get_swap_cache_page will use radix_tree_maybe_preload
    instead radix_tree_preload.  Looks like, this wasn't changed only by the
    reason of code duplication.
    Signed-off-by: default avatarDmitry Safonov <0x7f454c46@gmail.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Vladimir Davydov <vdavydov@parallels.com>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@fb.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: David Herrmann <dh.herrmann@gmail.com>
    Cc: Seth Jennings <sjennings@variantweb.net>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5b999aad
swap_state.c 13.1 KB