Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2514030imm; Thu, 27 Sep 2018 14:15:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV63SZoTQrEJq/9zXtyVOYMraaH/e5U8ZVRpZGmzswyWLjnTfziOk8ORfc3PldhQHjyyKSj0x X-Received: by 2002:a17:902:6689:: with SMTP id e9-v6mr12914902plk.115.1538082957463; Thu, 27 Sep 2018 14:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538082957; cv=none; d=google.com; s=arc-20160816; b=sD7rMDs5hJvRUo4wpqAZplCrwwL2hipM3MPAhUbMQ8f9VZaqLdA+tYO8btYQtrtcJ+ oPsu0Jk5j6UGBtlNavPq2gvXsOxpJ0kGey48fdjgfhJUIqmYl0y8e9amSGgeMW4UhuI6 +JcRlYNBP/oAdAbKbzKtOb2Hlt4VWYArccRixGFSXygSi/I0wY3cqQw9Bg6YXq/FAt0a cNNJ9jFgvAY3OWNNQTbPTqG4vZdd7vurvKLfH1i46f3dmhpFYH2FblKN3dll9jg2G9tt D4iP0ls4rkpsDwUj9n0IOVV57e4+15W/1FonHDopRPo6ESaP4c3sllYWwLD26cCShdsU sM/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:user-agent:in-reply-to:references:cc:to:subject:from :date:dkim-signature; bh=BHUCGebeB0Kbn5Sr/q3u+Ga0rAk709Yak3bFRcDeCWE=; b=a/7RYXtjsQTkE1qerfs2puAkQeuR4MjtkvYyO6onuQCDg8tYpbylxHiYz7PlUdiGZH HnX4oXikEBiv4FzpnJqV2TJZQcX26f/+WEwVBYCbWa4D/g3TBl2evmwUWb9MyWI79Ndr J5icEoPvYbsF3SdUCAGbdzRJ59hGXXb3FD5KYVRkrJaHMO9BUPCHg+mTxYs05g08kPwb QenTrbi7ml76jzb5loGsVOAdAiIemLhv9zCwOoZZam3Pc6Go2MIqsEltzWAPmDBTt/vl 1vA0t3r3qASdtxEgaqZZ6wsOWv0Hj+6QV7YIftXrNdvSVKxdZz1cspmhy+j+LJ45WoBd hGHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=LoGVoJxf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b128-v6si3194236pfg.94.2018.09.27.14.15.41; Thu, 27 Sep 2018 14:15:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=LoGVoJxf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728047AbeI1Dft (ORCPT + 99 others); Thu, 27 Sep 2018 23:35:49 -0400 Received: from sonic308-3.consmr.mail.bf2.yahoo.com ([74.6.130.42]:37877 "EHLO sonic308-3.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727331AbeI1Dft (ORCPT ); Thu, 27 Sep 2018 23:35:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1538082935; bh=BHUCGebeB0Kbn5Sr/q3u+Ga0rAk709Yak3bFRcDeCWE=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From:Subject; b=LoGVoJxfrxmEOqKBepeBcoRv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Jj6vXBQFv_YOyjQ3MDoKEKyggvwhneT0Nv22dz95ie.ZmS8XMsEmPjnR3FY47rl i9Xu6CrG6d83NGnwilykKmWdoDNT07IhDYhik0y23E0RQyl7wwmF1AsAgPcoDIyPaDBled1RWqJv Sq2lCaKdecZuVAlqEo0HRlYtzUXRtqVZgxfqBhWRpifaNElUp.Dbai2A.LT2G3NYoi6xE2Jfsxi1 bwpKGPBRZVsGAzYZY9UXqTt8L6zvqdqN42nvoTUulIC4etabbIj7e4Mnvg7V0Gig5t1CQhPjjpeO G9zSyyzzXMo85u7aG Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.bf2.yahoo.com with HTTP; Thu, 27 Sep 2018 21:15:35 +0000 Received: from pink.alxu.ca (EHLO localhost) ([198.98.62.56]) by smtp405.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 25f9d54bd857af37af9792a99e179ceb; Thu, 27 Sep 2018 21:15:32 +0000 (UTC) Date: Thu, 27 Sep 2018 17:15:27 -0400 From: "Alex Xu (Hello71)" Subject: [PATCH v2] mm: fix z3fold warnings on CONFIG_SMP=n To: Dan Streetman , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org References: <1538079759.qxp8zh3nwh.astroid@alex-archsus.none> <153808275043.724.15980761008814866300@pink.alxu.ca> In-Reply-To: <153808275043.724.15980761008814866300@pink.alxu.ca> User-Agent: astroid/0.13.0 (https://github.com/astroidmail/astroid) Message-Id: <1538082779.246sm0vb2p.astroid@alex-archsus.none> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Spinlocks are always lockable on UP systems, even if they were just locked. Cc: Dan Streetman Signed-off-by: Alex Xu (Hello71) --- mm/z3fold.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index 4b366d181..2e8d268ac 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -277,7 +277,7 @@ static void release_z3fold_page_locked(struct kref *ref= ) { struct z3fold_header *zhdr =3D container_of(ref, struct z3fold_header, refcount); - WARN_ON(z3fold_page_trylock(zhdr)); + WARN_ON_SMP(z3fold_page_trylock(zhdr)); __release_z3fold_page(zhdr, true); } =20 @@ -289,7 +289,7 @@ static void release_z3fold_page_locked_list(struct kref= *ref) list_del_init(&zhdr->buddy); spin_unlock(&zhdr->pool->lock); =20 - WARN_ON(z3fold_page_trylock(zhdr)); + WARN_ON_SMP(z3fold_page_trylock(zhdr)); __release_z3fold_page(zhdr, true); } =20 @@ -403,7 +403,7 @@ static void do_compact_page(struct z3fold_header *zhdr,= bool locked) =20 page =3D virt_to_page(zhdr); if (locked) - WARN_ON(z3fold_page_trylock(zhdr)); + WARN_ON_SMP(z3fold_page_trylock(zhdr)); else z3fold_page_lock(zhdr); if (WARN_ON(!test_and_clear_bit(NEEDS_COMPACTING, &page->private))) { --=20 2.19.0 =