From patchwork Sun Feb 23 23:17:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jules Irenge X-Patchwork-Id: 11420037 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 0F4D314B4 for ; Wed, 4 Mar 2020 12:24:46 +0000 (UTC) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7AF92166E for ; Wed, 4 Mar 2020 12:24:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7AF92166E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 024CO9Dn081990; Wed, 4 Mar 2020 12:24:23 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2yffwqwxks-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 12:24:23 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 024CEcfG049470; Wed, 4 Mar 2020 12:24:22 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 2yg1p7bt2c-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Wed, 04 Mar 2020 12:24:22 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1j9T4X-00026j-Ca; Wed, 04 Mar 2020 04:24:21 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1j60eE-00047S-S8 for ocfs2-devel@oss.oracle.com; Sun, 23 Feb 2020 15:26:54 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01NNMKTW186670 for ; Sun, 23 Feb 2020 23:26:54 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 2ybe0yrpm1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 23 Feb 2020 23:26:54 +0000 Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01NNO0If010041 for ; Sun, 23 Feb 2020 23:26:54 GMT Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by userp2030.oracle.com with ESMTP id 2yb6s78xdn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Sun, 23 Feb 2020 23:26:53 +0000 Received: by mail-lf1-f67.google.com with SMTP id c23so5479572lfi.7 for ; Sun, 23 Feb 2020 15:26:53 -0800 (PST) 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=lFuxxisMEYe+/8U1Zym099JlZSOgE3VEttxnE0HXI0I=; b=siiSjU7Ap6Gil3S6ekEYN1vS/k0A57lZeRTHSGFYrwJPA3l0GugxQqzEsRAewTLUqW X5HFBbGTgDL9G84usYuHS6TCeT3K4UU8J4kOg3hzb80xe6Y+6vdOLUD6JdCZAlHaBmVc Bv/gUjg+UQfUKY1W6OlE8pBxjUf8HT2MTN6yha9Vw4pqTaITQ1V36Dz2j+odk672EwJn JZfdYbMTEu7WDJ/z7Fn1Ig2mfvDPrG8ml0lc00c+d0abx0Otwlx1/7fc7sklzwEBC51D NXgNILifPILl75aZfjldM8FJcIXzQ/xVPLikCJAvs82aNaJQXmdz0UWgO4aCRN0EL0br amlA== X-Gm-Message-State: APjAAAXbwJbSuqjvByk0+UaGx+ANWCiLCn0JXmd42unGUcG6lLYubPkH zexdTT3XmWywmAaCQQ8wDxPlPIYFHZQi X-Google-Smtp-Source: APXvYqxAVsgm/trM7tHezLYbyeZyvVRYc8Us2IcaAJzj4wvZPBZUg0JJkJCal/cy2Jx4heZRTDzIvA== X-Received: by 2002:adf:dcc2:: with SMTP id x2mr61778973wrm.24.1582499916943; Sun, 23 Feb 2020 15:18:36 -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.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:36 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Date: Sun, 23 Feb 2020 23:17:11 +0000 Message-Id: <20200223231711.157699-31-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 X-PDR: PASS X-Source-IP: 209.85.167.67 X-ServerName: mail-lf1-f67.google.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 redirect=_spf.google.com X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9540 signatures=668685 X-Proofpoint-Spam-Details: rule=tap_spam_policies_notspam policy=tap_spam_policies score=0 spamscore=0 malwarescore=0 suspectscore=4 priorityscore=599 mlxlogscore=530 mlxscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 clxscore=155 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002230198 X-Spam: Clean X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=722 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002230198 X-Mailman-Approved-At: Wed, 04 Mar 2020 04:24:20 -0800 Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, "moderated list:ORACLE CLUSTER FILESYSTEM 2 OCFS2" Subject: [Ocfs2-devel] [PATCH 30/30] sgi-xp: Add missing annotation for ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040095 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 phishscore=0 clxscore=1034 bulkscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040095 Sparse reports a warning at ocfs2_inode_cache_lock() and ocfs2_inode_cache_unlock() warning: context imbalance in ocfs2_inode_cache_lock() - wrong count at exit warning: context imbalance in ocfs2_inode_cache_unlock() - unexpected unlock The root cause is a missing annotation at ocfs2_inode_cache_lock() and at ocfs2_inode_cache_unlock() Add the missing __acquires(&oi->ip_lock) annotation Add the missing __releases(&oi->ip_lock) annotation Signed-off-by: Jules Irenge --- fs/ocfs2/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 7c9dfd50c1c1..0b87e0a63ab9 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -1623,6 +1623,7 @@ static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info } static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci) + __acquires(&oi->ip_lock) { struct ocfs2_inode_info *oi = cache_info_to_inode(ci); @@ -1630,6 +1631,7 @@ static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci) } static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci) + __releases(&oi->ip_lock) { struct ocfs2_inode_info *oi = cache_info_to_inode(ci);