mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
mm/swap: remove unneeded return value of free_swap_slot
The return value of free_swap_slot is always 0 and also ignored now. Remove it to clean up the code. Link: https://lkml.kernel.org/r/20220509131416.17553-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Cc: Alistair Popple <apopple@nvidia.com> Cc: David Howells <dhowells@redhat.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Naoya Horiguchi <naoya.horiguchi@nec.com> Cc: NeilBrown <neilb@suse.de> Cc: Peter Xu <peterx@redhat.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -24,7 +24,7 @@ struct swap_slots_cache {
|
|||||||
void disable_swap_slots_cache_lock(void);
|
void disable_swap_slots_cache_lock(void);
|
||||||
void reenable_swap_slots_cache_unlock(void);
|
void reenable_swap_slots_cache_unlock(void);
|
||||||
void enable_swap_slots_cache(void);
|
void enable_swap_slots_cache(void);
|
||||||
int free_swap_slot(swp_entry_t entry);
|
void free_swap_slot(swp_entry_t entry);
|
||||||
|
|
||||||
extern bool swap_slot_cache_enabled;
|
extern bool swap_slot_cache_enabled;
|
||||||
|
|
||||||
|
@@ -269,7 +269,7 @@ static int refill_swap_slots_cache(struct swap_slots_cache *cache)
|
|||||||
return cache->nr;
|
return cache->nr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int free_swap_slot(swp_entry_t entry)
|
void free_swap_slot(swp_entry_t entry)
|
||||||
{
|
{
|
||||||
struct swap_slots_cache *cache;
|
struct swap_slots_cache *cache;
|
||||||
|
|
||||||
@@ -297,8 +297,6 @@ int free_swap_slot(swp_entry_t entry)
|
|||||||
direct_free:
|
direct_free:
|
||||||
swapcache_free_entries(&entry, 1);
|
swapcache_free_entries(&entry, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
swp_entry_t folio_alloc_swap(struct folio *folio)
|
swp_entry_t folio_alloc_swap(struct folio *folio)
|
||||||
|
Reference in New Issue
Block a user