]> git.baikalelectronics.ru Git - kernel.git/commit
mm: only make map_swap_entry available for CONFIG_HIBERNATION
authorJens Axboe <axboe@kernel.dk>
Wed, 27 Jan 2021 17:04:49 +0000 (10:04 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 Jan 2021 17:04:49 +0000 (10:04 -0700)
commit4530f74b74e8d346c29f542ecf492293a2ee4fd2
tree566a779cfbd9bb7baec2f71645d1274ffab70580
parent7e3f8c327aff61dc9a1607c7aad40efb20665ada
mm: only make map_swap_entry available for CONFIG_HIBERNATION

Current tree spews this on compile:

mm/swapfile.c:2290:17: warning: ‘map_swap_entry’ defined but not used [-Wunused-function]
 2290 | static sector_t map_swap_entry(swp_entry_t entry, struct block_device **bdev)
       |                 ^~~~~~~~~~~~~~

if !CONFIG_HIBERNATION, as we don't use the function unless we have that
config option set.

Fixes: 7e3f8c327aff ("mm: remove get_swap_bio")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
mm/swapfile.c