Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1785766ybv; Sun, 23 Feb 2020 15:21:55 -0800 (PST) X-Google-Smtp-Source: APXvYqw93oYjO5lksHa+Vw2jFZ7KZvxWKnNiD9T8YNcAnEr4rGQoTPdC8zOyrm2axwZOR7clXZw1 X-Received: by 2002:a9d:7ad9:: with SMTP id m25mr36379187otn.13.1582500114788; Sun, 23 Feb 2020 15:21:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582500114; cv=none; d=google.com; s=arc-20160816; b=c2A8SZFbcjJgdCqNtVn4wSVbLEe2DKn0FNfwQw9bkrQZk4E7P0y1URhBKdKvk18bWl 9vVc+t3B7nXCayndCH9SRGLCfs5jlJ/seSlOT1p7cslnjNOlUOycRd8I5SL8qNhN1xgp f4jWEKmNswWVT7RJbeqp2mZpG/14fMofNHcUAEg29VmIu1NQ5JANYv+J22PCSCrjtWNO 6cfu8+pfnNOGVcqfbMPnvOhPG7BTL7DeZve/I8vpkOPPA6+1nN1BZ+r9oFJ0aUnwlt/w dxbowkLFW7ZDe9AfEEiZU3Gt7n1LVfHjKPLZXtkCJMoGd/itrLwjJ6v+2mJRE9o0HN0i ySag== 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=Ic1q2DA4tBzvn95/5QBdtjGvI/C7xVEzkX6mr+GRlig=; b=AHfL+S2pIa8C4XANhojW/McJrEQlLw05g34Jdtb4ZbYjWjzb8S7ueH/vxc6nwwVx3R JazclhwdCTIMuOUvkZHbxi/bwz66QkQUbnwBZSn72wuI3Ysbpt3WKCLnG/jbNApI3PP3 rtAZYvEYDDj3/ZLI9FDtMh2aHazKqCfxh229sevAKUvrCDk+Fwwm0PB8FNwAJTjdh0B0 lJRBN55d496Ylcpw2aooOAf9pzoO6rUtI+EYonKeAgf8/SozaVz0Mk3yBmwFI9onuRmH 4+aIWUx5hrVTBCOWvREPGO6Kkn3eZKyvqE3eDGquhkDKht7qZ72T/5M9+83rDtnZpvX0 ho9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QlPdmahe; 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 y205si3878177oig.137.2020.02.23.15.21.42; Sun, 23 Feb 2020 15:21:54 -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=QlPdmahe; 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 S1727229AbgBWXUO (ORCPT + 99 others); Sun, 23 Feb 2020 18:20:14 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43809 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbgBWXR6 (ORCPT ); Sun, 23 Feb 2020 18:17:58 -0500 Received: by mail-wr1-f65.google.com with SMTP id r11so8222582wrq.10; Sun, 23 Feb 2020 15:17:57 -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=Ic1q2DA4tBzvn95/5QBdtjGvI/C7xVEzkX6mr+GRlig=; b=QlPdmahetukXS0taCeLY9OE2knc89tS/FlyFEK9SvEQxZYzYtmPHEWd1fhXXL47Tbe R/X47lAUoVlNHJguWmQqMc+B7C0u2CnkqcjNfWtnVO7jAAIHS4lFoM6Rt2ushKyEUvdU pHSkJ4GWCcfIFc+XS82/Yj2w8Yd4fl2EXATNU5QYDTEiDKZuGv2yh8n49Sz2GvXfAa21 hQQ//cHhB0YwyIfF3mnsMm+9Shw3gzwHJKdK0QzBG/CDra5r/94R2XOsqYmyRgHW5gtQ 6rENDD5eg45JL+tzLhDEbY8UXvdidw9cLfXrMHaHdEs85Jo59NtokXaxeI46BlSespqG Mc+A== 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=Ic1q2DA4tBzvn95/5QBdtjGvI/C7xVEzkX6mr+GRlig=; b=Nx+6j3zj/8/Iu1Y5eXO3qnnv4fMp6wYT4ozYOxJVghigTVOVK6P3qhgMQDir6fatcj jUpVFrHULkkHRXAT7FSu4FPvG+wq9xqwqrkzL8FUQNKRg6YTvFHXa3qKb5lnfFAewKlW 0HXkGVu1ozCh8oIlgSe1jIKlTmO4ZuE+Oii9pRvQvFX2Oihyt8SwJz6cshpDAhmucsza FvBvv46B14VA7FSKG7/GZBFnRFM0BqiVJnN3+HNdIAm5xAFnCfirG3HCXnBFLm4ToWvV tbCICZPNdMAIOqD9tJzJNns3u1ELIskLtkw3KkhQ4dbr9AFP+Lqe+JCIWb4MXkltPOGt CLuQ== X-Gm-Message-State: APjAAAVSzVWa+78yJVpiRtQnIoepvNNck71wK0RMTkLjmKKoJmwrYxbv NcvoodOe82IWe6iNxpJoBw== X-Received: by 2002:a5d:4088:: with SMTP id o8mr12554441wrp.144.1582499876300; Sun, 23 Feb 2020 15:17:56 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id q6sm8968203wrf.67.2020.02.23.15.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:17:55 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, "Darrick J. Wong" , linux-xfs@vger.kernel.org (supporter:XFS FILESYSTEM) Subject: [PATCH 03/30] xfs: Add missing annotation to xfs_ail_check() Date: Sun, 23 Feb 2020 23:16:44 +0000 Message-Id: <20200223231711.157699-4-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200223231711.157699-1-jbi.octave@gmail.com> References: <0/30> <20200223231711.157699-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 xfs_ail_check() warning: context imbalance in xfs_ail_check() - unexpected unlock The root cause is the missing annotation at xfs_ail_check() Add the missing __must_hold(&ailp->ail_lock) annotation Signed-off-by: Jules Irenge --- fs/xfs/xfs_trans_ail.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index 00cc5b8734be..58d4ef1b4c05 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c @@ -32,6 +32,7 @@ STATIC void xfs_ail_check( struct xfs_ail *ailp, struct xfs_log_item *lip) + __must_hold(&ailp->ail_lock) { struct xfs_log_item *prev_lip; struct xfs_log_item *next_lip; -- 2.24.1