• Christoph Hellwig's avatar
    mm: split swap_type_of · 21bd9005
    Christoph Hellwig authored
    swap_type_of is used for two entirely different purposes:
    
     (1) check what swap type a given device/offset corresponds to
     (2) find the first available swap device that can be written to
    
    Mixing both in a single function creates an unreadable mess.  Create two
    separate functions instead, and switch both to pass a dev_t instead of
    a struct block_device to further simplify the code.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    21bd9005
swapfile.c 96.9 KB