mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
mm/swapfile.c: use helper function swap_count() in add_swap_count_continuation()
Commit570a335b8e
("swap_info: swap count continuations") introduced the func add_swap_count_continuation() but forgot to use the helper function swap_count() introduced by commit355cfa73dd
("mm: modify swap_map and add SWAP_HAS_CACHE flag"). Link: https://lkml.kernel.org/r/20201009134306.18033-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
43fbdeb349
commit
d8aa24e04f
@ -3613,7 +3613,7 @@ int add_swap_count_continuation(swp_entry_t entry, gfp_t gfp_mask)
|
||||
|
||||
ci = lock_cluster(si, offset);
|
||||
|
||||
count = si->swap_map[offset] & ~SWAP_HAS_CACHE;
|
||||
count = swap_count(si->swap_map[offset]);
|
||||
|
||||
if ((count & ~COUNT_CONTINUED) != SWAP_MAP_MAX) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user