Message ID | 20200224204130.18178-1-jbi.octave@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=R3DB=4V=oss.oracle.com=ocfs2-devel-bounces@kernel.org> 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 2EEF91580 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 4 Mar 2020 12:24:46 +0000 (UTC) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (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 04C6D21744 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 4 Mar 2020 12:24:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04C6D21744 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 (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 024CN1tb136841; Wed, 4 Mar 2020 12:24:22 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2yghn39rnq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 12:24:22 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 024CEmLM167339; Wed, 4 Mar 2020 12:24:22 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 2yg1eppj7s-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 <ocfs2-devel-bounces@oss.oracle.com>) id 1j9T4X-00027U-Ee; Wed, 04 Mar 2020 04:24:21 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <jbi.octave@gmail.com>) id 1j6KYA-0003IN-NC for ocfs2-devel@oss.oracle.com; Mon, 24 Feb 2020 12:41:58 -0800 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01OKSAUd070729 for <ocfs2-devel@oss.oracle.com>; Mon, 24 Feb 2020 20:41:58 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3030.oracle.com with ESMTP id 2ybdshjq9v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <ocfs2-devel@oss.oracle.com>; Mon, 24 Feb 2020 20:41:58 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01OKbTgP045140 for <ocfs2-devel@oss.oracle.com>; Mon, 24 Feb 2020 20:41:57 GMT Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by userp2040.oracle.com with ESMTP id 2yce66hgm4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for <ocfs2-devel@oss.oracle.com>; Mon, 24 Feb 2020 20:41:57 +0000 Received: by mail-wm1-f67.google.com with SMTP id s10so707953wmh.3 for <ocfs2-devel@oss.oracle.com>; Mon, 24 Feb 2020 12:41:57 -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:mime-version :content-transfer-encoding; bh=myk+lKJeHf/NwI1kOPcB/C/w3kbJudSAOTZpQWJrDy0=; b=KrrCxeJfh5fZSP3uOsjdccYrHWyhAGRwnUDUuKqbeFyr4rOG0S6z2YD96VDy5AUPnX cAKbZzTLX4YrpIUGNeJQGNCtLN12DrKf4Krp9Ne3oPgcHCDVQ2ZsAOO3wcb2g/P3i9dz rtvypnlcVf/Zw0FXRPhdVyiSKJDsR2EXGBFLzZHmaZlJuaWBHYqJwHGtdCXGMc1OFhvS Z8pDw53IZMvCeXOr1rgtMnXK7Gv8clccShw36amt/Hizdi7Nce79PWZl8rsXokbhYY8a zGSvQUOSoMdKv3zb2oP0LeASJqmnJnOcpU4jF70ApMygGB8uCjyQ5ipnEoJwb/W9H5YB GiwQ== X-Gm-Message-State: APjAAAWWtNMjNVlhf4F7K5CjoMqVJvQ6XFO4I6LKgEwuSGxmt8ZbRnXM Se+jjUdEpN4lMK7QYpv3Qw== X-Google-Smtp-Source: APXvYqwzyNh4fYpdcAkxTPstW6qmCCTN7eutGDv0MC2GBY2COJ6PGJe9MKA9fPgywPp0f4VI/LSMxA== X-Received: by 2002:a1c:2b44:: with SMTP id r65mr796422wmr.72.1582576914733; Mon, 24 Feb 2020 12:41:54 -0800 (PST) Received: from ninjahub.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id h128sm863315wmh.33.2020.02.24.12.41.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 12:41:54 -0800 (PST) From: Jules Irenge <jbi.octave@gmail.com> To: boqun.feng@gmail.com Date: Mon, 24 Feb 2020 20:41:30 +0000 Message-Id: <20200224204130.18178-1-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 209.85.128.67 X-ServerName: mail-wm1-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=9541 signatures=668685 X-Proofpoint-Spam-Details: rule=tap_spam_policies_notspam policy=tap_spam_policies score=0 lowpriorityscore=0 mlxlogscore=511 priorityscore=345 phishscore=0 adultscore=0 suspectscore=4 clxscore=117 spamscore=0 mlxscore=0 malwarescore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002240151 X-Spam: Clean X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=1 spamscore=0 malwarescore=0 mlxscore=0 bulkscore=0 mlxlogscore=701 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002240150 X-Mailman-Approved-At: Wed, 04 Mar 2020 04:24:20 -0800 Cc: Jules Irenge <jbi.octave@gmail.com>, open list <linux-kernel@vger.kernel.org>, joseph.qi@linux.alibab.com, "moderated list:ORACLE CLUSTER FILESYSTEM 2 OCFS2" <ocfs2-devel@oss.oracle.com> Subject: [Ocfs2-devel] [PATCH] ocfs2: Add missing annotations for ocfs2_refcount_cache_lock() and ocfs2_refcount_cache_unlock() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: <ocfs2-devel.oss.oracle.com> List-Unsubscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=unsubscribe> List-Archive: <http://oss.oracle.com/pipermail/ocfs2-devel> List-Post: <mailto:ocfs2-devel@oss.oracle.com> List-Help: <mailto:ocfs2-devel-request@oss.oracle.com?subject=help> List-Subscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 adultscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=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 malwarescore=0 phishscore=0 spamscore=0 impostorscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 bulkscore=0 clxscore=1034 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040095 |
Series |
ocfs2: Add missing annotations for ocfs2_refcount_cache_lock() and ocfs2_refcount_cache_unlock()
|
expand
|
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index ee43e51188be..da99c80f49da 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -154,6 +154,7 @@ ocfs2_refcount_cache_get_super(struct ocfs2_caching_info *ci) } static void ocfs2_refcount_cache_lock(struct ocfs2_caching_info *ci) + __acquires(&rf->rf_lock) { struct ocfs2_refcount_tree *rf = cache_info_to_refcount(ci); @@ -161,6 +162,7 @@ static void ocfs2_refcount_cache_lock(struct ocfs2_caching_info *ci) } static void ocfs2_refcount_cache_unlock(struct ocfs2_caching_info *ci) + __releases(&rf->rf_lock) { struct ocfs2_refcount_tree *rf = cache_info_to_refcount(ci);
Sparse reports warnings at ocfs2_refcount_cache_lock() and ocfs2_refcount_cache_unlock() warning: context imbalance in ocfs2_refcount_cache_lock() - wrong count at exit warning: context imbalance in ocfs2_refcount_cache_unlock() - unexpected unlock The root cause is the missing annotation at ocfs2_refcount_cache_lock() and at ocfs2_refcount_cache_unlock() Add the missing __acquires(&rf->rf_lock) annotation to ocfs2_refcount_cache_lock() Add the missing __releases(&rf->rf_lock) annotation to ocfs2_refcount_cache_unlock() Signed-off-by: Jules Irenge <jbi.octave@gmail.com> --- fs/ocfs2/refcounttree.c | 2 ++ 1 file changed, 2 insertions(+)