Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2168449ybv; Fri, 14 Feb 2020 12:52:37 -0800 (PST) X-Google-Smtp-Source: APXvYqy1SVgTgEIVUbI8m7Dg5GDY5gXd3ZDOdvq9EteFRaQPrgsppnD+w1ZDJcGwiRtwLrLG9Pk3 X-Received: by 2002:a9d:6b12:: with SMTP id g18mr3650194otp.211.1581713557672; Fri, 14 Feb 2020 12:52:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713557; cv=none; d=google.com; s=arc-20160816; b=IKrm/0sUEuVp1d8WXuPBJnvsstFL55s/lDY/mAjBniBHlxNfec7TDgTbjMIBXw77Sz 7BsG9tGzJUEHzV+uY+aCUhiuB+ttK8HFfAD8KEZFwAdpkhFfFlLYPjXxSg9b8LjvPdtC YxA4957W1GcbGKG3oLtLrpDH5dcF+iaoSTijeK+0SnkMIMXMrPHwXUZp+aleYWtl4JjA E6+kud8g7zBucgt3uhQRzRFkxTln/xirVpvgw7suf4bFX21BbQtmQimisGSTd6X7tB06 I7tn2LrJ0rQOsvv22IuKyiPeA8y3Hzw08ryZBdgHwS1ccCNWZBU0UKlAzYg8U0+IKFLt ivVA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Pbmn+SUdppaytTIm55Vu3EoB2HaBMzvMhJbMSUXtTKU=; b=QXC+O7HMTYloyhNnh2bxFumcszrA/KkWn4A/vyaJAtfPJFIzq5CKiqUSp0YFcJ6o4/ +kWNmWX+xWTDBrY96u25V9oZXqcJUqu0vk/qGzVz5fAIuXcYW3+XNS5thIetqtIxeHPV dAjhggwzKhNsqVBRwbp70tHKXsxbHqphUNt7hhMZNWfqgkE1z92A9dn1e2+N2NQNtp1D qSE2OqUaauLJ2fCto0dXXI9Q8U/NRVE4oChiRvUvZxISklAyU4KdlL3VFZX/6IvWOngT wUpXA65F1lTApAi6shXJKjTwdf2Iovtl/jfC/dIi7Bpm5J26UMslooHR43r1LRGE1nZX V5Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Jvdm696K; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l204si3506384oig.31.2020.02.14.12.52.25; Fri, 14 Feb 2020 12:52:37 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=Jvdm696K; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388422AbgBNUuW (ORCPT + 99 others); Fri, 14 Feb 2020 15:50:22 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:32889 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388189AbgBNUss (ORCPT ); Fri, 14 Feb 2020 15:48:48 -0500 Received: by mail-wr1-f68.google.com with SMTP id u6so12513514wrt.0 for ; Fri, 14 Feb 2020 12:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pbmn+SUdppaytTIm55Vu3EoB2HaBMzvMhJbMSUXtTKU=; b=Jvdm696Kke8OXidCOhjDEIxvqAYzTvoeVdU5F9EPjjOBjQTFD0qSiYJH7zf2qB6l8x yjYCrTj+Y14x36O8wRTZZ7iogsFwgOm4kpe8vyZ9yZ8tYX/2JuwyKDHpuEXPTlsO79cs vKitgdyzQ4snP4qUV/BAgMm6TBhaftNOwnxTnopiH2LxCACTGyVKWFsClowkpsVosdRm wd6m3IHT21HsWtVCtrt0HDBQRdVxUAflsp2AJuIJYyT65+tra3UYLLM9auiw8SohFLw7 zgyzuv98NVUNz8M2P08tuSIXOzLGWCRt7qwl7XGJT9fELHb44rzUiHUkI8+lXZ7mrYvb q1jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pbmn+SUdppaytTIm55Vu3EoB2HaBMzvMhJbMSUXtTKU=; b=qxpD2rNrkxv8uzHQkm3lPXwzElqGTQFHSC+s6OQT1T/ANohbJIG2sdlPRB7kPLeEBi OnGT1ch7et8QfXxpIOPMRZYYoMdF1XV9CfIBGa0QElZa1x20AqpnbZ9NvpXMp5tg3ugH XpSoQgd64rwOHAZpTgUwg9gf0wrzr4PDvLbRATpR3Xc60g6Pq0zAYeWmARed4/qhsXCx 9hYQVxj8mud1o/IqN1sKqEcqUsX4323BwJgsblD5EdEEvx3TMSOtklcIrbxwL6182/Ti UYApYcXy0usaBELX/YK/Y17jcHBmKJChobAwSBy1jd2KWK6XbvvdHOm8zuBW4Mp3X89W SU9A== X-Gm-Message-State: APjAAAXOERTZXL1rRppFjW12sW0FCsK01HDrmgH6SexcmCB96ycZ73jO c2Z4RmRpHmI6NC/B9W/K+alQPUt7otyx X-Received: by 2002:adf:df0f:: with SMTP id y15mr5737224wrl.26.1581713325249; Fri, 14 Feb 2020 12:48:45 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id y12sm8660782wmj.6.2020.02.14.12.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:48:44 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , Minchan Kim , Nitin Gupta , Sergey Senozhatsky , Andrew Morton , linux-mm@kvack.org (open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR) Subject: [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock() Date: Fri, 14 Feb 2020 20:47:21 +0000 Message-Id: <20200214204741.94112-11-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200214204741.94112-1-jbi.octave@gmail.com> References: <0/30> <20200214204741.94112-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports a warning at migrate_read_lock()() warning: context imbalance in migrate_read_lock() - wrong count at exit The root cause is the missing annotation at migrate_read_lock() Add the missing __acquires(&zspage->lock) annotation Signed-off-by: Jules Irenge --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 22d17ecfe7df..da70817b4ed8 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1833,7 +1833,7 @@ static void migrate_lock_init(struct zspage *zspage) rwlock_init(&zspage->lock); } -static void migrate_read_lock(struct zspage *zspage) +static void migrate_read_lock(struct zspage *zspage) __acquires(&zspage->lock) { read_lock(&zspage->lock); } -- 2.24.1