From patchwork Fri Oct 9 13:43:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 11825845 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E84F96CA for ; Fri, 9 Oct 2020 13:43:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9239E22265 for ; Fri, 9 Oct 2020 13:43:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9239E22265 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7FF9B6B006E; Fri, 9 Oct 2020 09:43:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7AE706B0071; Fri, 9 Oct 2020 09:43:28 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6C3CA6B0072; Fri, 9 Oct 2020 09:43:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 3D5976B006E for ; Fri, 9 Oct 2020 09:43:28 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C66128249980 for ; Fri, 9 Oct 2020 13:43:27 +0000 (UTC) X-FDA: 77352504054.26.sack41_34089a9271e1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id A4E5E1804B654 for ; Fri, 9 Oct 2020 13:43:27 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,linmiaohe@huawei.com,,RULES_HIT:30054,0,RBL:45.249.212.32:@huawei.com:.lbl8.mailshell.net-62.18.2.100 64.95.201.95;04yffcedn5ca6enopq1z5aro7wxaboc79bjyxetp7nr5e5u4fjttgypcdw4n7t6.pib7zsgfct6kfnbwhqmkmfqixc4zuwom6nqf5c1abazp8hjeet5yuanuzu5uedf.4-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: sack41_34089a9271e1 X-Filterd-Recvd-Size: 1863 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Fri, 9 Oct 2020 13:43:25 +0000 (UTC) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B378ADB4CB3495B7DDC5; Fri, 9 Oct 2020 21:43:21 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Fri, 9 Oct 2020 21:43:15 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm/swapfile.c: Use helper function swap_count() in add_swap_count_continuation() Date: Fri, 9 Oct 2020 09:43:06 -0400 Message-ID: <20201009134306.18033-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Commit 570a335b8e22 ("swap_info: swap count continuations") introduced the func add_swap_count_continuation() but forgot to use the helper function swap_count() introduced by commit 355cfa73ddff ("mm: modify swap_map and add SWAP_HAS_CACHE flag"). Signed-off-by: Miaohe Lin --- mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 22c63beb10da..4d5bc19d1e08 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3608,7 +3608,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) { /*