Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5193381imw; Wed, 20 Jul 2022 00:18:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sEuMJL4s87dLHVI/iyekHeerbFFsnmQJe+uL9DojqakTnfFRlk5OiIvRqUV9C2P74MfzVK X-Received: by 2002:a05:6a00:181c:b0:52a:bc83:d767 with SMTP id y28-20020a056a00181c00b0052abc83d767mr36987204pfa.76.1658301498519; Wed, 20 Jul 2022 00:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658301498; cv=none; d=google.com; s=arc-20160816; b=h3GEqM0PzMVeai6eBhDfk7nejyGzM5NZU01ILO6HOs2AfViuOxbwKUSN30U63VaDKS QJf6lW5gZMOWqaIIVO71uH0etnoFetPjvsw+SuSCSke64qJbWM+9JHArLQ05R3i2JXVf sGvi2P44Ojm0z79IVvzqsy4uIWHOq1ZZbFgJQypl9UBlzTawnCt+kZFx4dVPaHJ1QUjw TwQUUYrd/SdOHmsfYzSzyO35yGLhQx8I9NyBc80hnOi5TYn/8uPRzZajzvn2AjuPkXJ8 q0o6Zbjlp+3H1KbfJa/WZad3ja1Ol8Hs7g2Z03eyLAktNj3Y1xMdnieNUv6uFKhQKDj4 TWXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=AF+KtcQcuFeKsfB6J6qxSptBOPPY8MNLklD1mjEET1o=; b=fmfq4ISOHwdI4/db3Xu2JmyIj73XiT4ex/DsnBbjy2Dgm14e87F+CttiCpmJtFlzVP cRzBdhlnfZp/i+ut4zuc97i4h2MS+hs7QV6kGpBgf4wMDW2NlK6NKjJEkMjD2lthU9cM aQ9zLJhWK1C0Hmmc5MAOpLkREDVTWUuc59e+tzbBsxgtNg0m6o4vjbij/RSfWkDthmWF lI1uVWqwGhq/ZlpDGB1U1/ALUFOutDM99Pc0Yvo1wCf4diZUcpjk/eEJL3Z1lYc4Jrp2 CtqNKkwT7IGEb9a7lLOeAcpHbCwrvJMwWzsw+iVNQaMXysYRVBHIPew0GpI4qVJf5w4x 2Bpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VRCq53cY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a63000c000000b0041a61db4987si2242583pga.6.2022.07.20.00.18.03; Wed, 20 Jul 2022 00:18:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VRCq53cY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235749AbiGTG6Y (ORCPT + 99 others); Wed, 20 Jul 2022 02:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233698AbiGTG6W (ORCPT ); Wed, 20 Jul 2022 02:58:22 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDA6054ACE for ; Tue, 19 Jul 2022 23:58:20 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id f65so15566148pgc.12 for ; Tue, 19 Jul 2022 23:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AF+KtcQcuFeKsfB6J6qxSptBOPPY8MNLklD1mjEET1o=; b=VRCq53cYNSDyBLSgveHJIkDyFrcNcVtzhsy5iMjhubVqaq4jcpMqJ9oYTP+MzSbY82 UAbEyfZ4oPvv4q1iADvhggNOfrn1oSl4zSZYn1/+cfBl27yU4jZcpC9AZHk4Kh3ulHzv iJGqmnB4CG/wFSwt09/Vtf/b8l3p0/9JDcH5b+aM4EwjMIh4XfBqeaxBVlll4t/El0x6 WS0RtSy5CAZ/WFSCD247Lfog/EShj7J3FlBVY22x03rrq25NRE7CPdpp59ih6+NIHhup q/b5BewK7+XUA4ltxxWf0kUy4AlUcjp/71y3CG2lxQtsUYOb+9HKFagxu6s+mp+DPC78 4Vcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AF+KtcQcuFeKsfB6J6qxSptBOPPY8MNLklD1mjEET1o=; b=j6qRU1dP5X3OLFQ6ijiKVEYRfQVGLL37TEkDa8sfkJw1xa1j+6+KxWOsYoNI4mTtUa +iH0A7evN5GnMINcI9dQtv93AR01cdbTikh8YnRwC79AgM4wrXduRvlPhDtzTl7vShhs uhJyh3L15rzDwicT+0k5eTbeH9rH3x5isWnAPe3vbtlSaFVcwIuVYT4OHgzENYDkTx3a OR25tQEIoqMGMQ4rWpmr2oXDAaHsAYtnKkGCkVW7BliBGtZOvKitEac8pcAGrSVhNbsW GtdehupRvg8KH1cjGVoukL5jQpOYRKzd5wEwTEgrHf+UwPBGZFPC5nTKytxHZtvsWeVH B4Xg== X-Gm-Message-State: AJIora9PbWK/OxvDj1fI2M7mXTRHHZuo16x8ZnXIZRSX3gazwctCYCuH NU+ho4lrU6JbGMgl857B4yE= X-Received: by 2002:a05:6a00:793:b0:52a:b261:f8e7 with SMTP id g19-20020a056a00079300b0052ab261f8e7mr37269509pfu.20.1658300300172; Tue, 19 Jul 2022 23:58:20 -0700 (PDT) Received: from localhost.localdomain ([43.132.141.4]) by smtp.gmail.com with ESMTPSA id c6-20020a63d146000000b0040d75537824sm11201782pgj.86.2022.07.19.23.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 23:58:19 -0700 (PDT) From: zengjx95@gmail.com To: vitaly.wool@konsulko.com, linmiaohe@huawei.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zeng Jingxiang Subject: [PATCH] mm/z3fold: do not unlock in z3fold_page_putback() Date: Wed, 20 Jul 2022 14:57:44 +0800 Message-Id: <20220720065744.1006305-1-zengjx95@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zeng Jingxiang z3fold_page_lock() will lock zhdr->page_lock 1630 z3fold_page_lock(zhdr); return without unlocking zhdr->page_lock 1634 if (kref_put(&zhdr->refcount, release_z3fold_page_locked)) 1635 return; Signed-off-by: Zeng Jingxiang --- mm/z3fold.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index f41f8b0d9e9a..03785832ad47 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -1632,13 +1632,14 @@ static void z3fold_page_putback(struct page *page) list_del_init(&zhdr->buddy); INIT_LIST_HEAD(&page->lru); if (kref_put(&zhdr->refcount, release_z3fold_page_locked)) - return; + goto ret; spin_lock(&pool->lock); list_add(&page->lru, &pool->lru); spin_unlock(&pool->lock); if (list_empty(&zhdr->buddy)) add_to_unbuddied(pool, zhdr); clear_bit(PAGE_CLAIMED, &page->private); +ret: z3fold_page_unlock(zhdr); } -- 2.27.0