From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CBF8C07E96 for ; Mon, 12 Jul 2021 01:46:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E75836044F for ; Mon, 12 Jul 2021 01:46:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbhGLBtn (ORCPT ); Sun, 11 Jul 2021 21:49:43 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:53105 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbhGLBtm (ORCPT ); Sun, 11 Jul 2021 21:49:42 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UfQgodm_1626054412; Received: from B-D1K7ML85-0059.local(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0UfQgodm_1626054412) by smtp.aliyun-inc.com(127.0.0.1); Mon, 12 Jul 2021 09:46:53 +0800 Subject: Re: [PATCH] ocfs2: remove an unnecessary condition To: Dan Carpenter , Mark Fasheh , Larry Chen , akpm Cc: Joel Becker , ocfs2-devel@oss.oracle.com, kernel-janitors@vger.kernel.org References: From: Joseph Qi Message-ID: <132a151e-3a09-5583-279c-748702752eba@linux.alibaba.com> Date: Mon, 12 Jul 2021 09:46:52 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: kernel-janitors@vger.kernel.org On 7/8/21 10:16 PM, Dan Carpenter wrote: > The case where "tmp_oh" is NULL is handled at the start of the function. > At this point we know it's non-NULL so this will always return 1. > > Signed-off-by: Dan Carpenter Reviewed-by: Joseph Qi > --- > fs/ocfs2/dlmglue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c > index 48fd369c29a4..33fbdc823278 100644 > --- a/fs/ocfs2/dlmglue.c > +++ b/fs/ocfs2/dlmglue.c > @@ -2721,7 +2721,7 @@ int ocfs2_inode_lock_tracker(struct inode *inode, > return status; > } > } > - return tmp_oh ? 1 : 0; > + return 1; > } > > void ocfs2_inode_unlock_tracker(struct inode *inode, > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5FEEC07E9B for ; Mon, 12 Jul 2021 01:47:37 +0000 (UTC) Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 2DD946101E for ; Mon, 12 Jul 2021 01:47:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DD946101E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16C1fDwf001790; Mon, 12 Jul 2021 01:47:36 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 39r9hcg3qc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jul 2021 01:47:36 +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 16C1epQr018887; Mon, 12 Jul 2021 01:47:35 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 39qnartekq-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Mon, 12 Jul 2021 01:47:35 +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 1m2l2j-0002Hm-TO; Sun, 11 Jul 2021 18:47:33 -0700 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1m2l2K-0002Gv-2z for ocfs2-devel@oss.oracle.com; Sun, 11 Jul 2021 18:47:08 -0700 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 16C1engg166291 for ; Mon, 12 Jul 2021 01:47:07 GMT Received: from mx0b-00069f01.pphosted.com (mx0b-00069f01.pphosted.com [205.220.177.26]) by aserp3030.oracle.com with ESMTP id 39qycpgymx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 12 Jul 2021 01:47:07 +0000 Received: from pps.filterd (m0246580.ppops.net [127.0.0.1]) by mx0b-00069f01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16C1l6rT001524 for ; Mon, 12 Jul 2021 01:47:06 GMT Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by mx0b-00069f01.pphosted.com with ESMTP id 39r2y62k6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 12 Jul 2021 01:47:06 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R131e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04400; MF=joseph.qi@linux.alibaba.com; NM=1; PH=DS; RN=7; SR=0; TI=SMTPD_---0UfQgodm_1626054412; Received: from B-D1K7ML85-0059.local(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0UfQgodm_1626054412) by smtp.aliyun-inc.com(127.0.0.1); Mon, 12 Jul 2021 09:46:53 +0800 To: Dan Carpenter , Mark Fasheh , Larry Chen , akpm References: From: Joseph Qi Message-ID: <132a151e-3a09-5583-279c-748702752eba@linux.alibaba.com> Date: Mon, 12 Jul 2021 09:46:52 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Source-IP: 115.124.30.44 X-ServerName: out30-44.freemail.mail.aliyun.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf1.service.alibaba.com include:spf2.service.alibaba.com include:spf1.ocm.aliyun.com include:spf2.ocm.aliyun.com include:spf1.staff.mail.aliyun.com include:a.hichina.mail.aliyun.com include:b.hichina.mail.aliyun.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10042 signatures=668682 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 malwarescore=0 priorityscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 spamscore=0 phishscore=0 clxscore=236 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107120013 domainage_hfrom=8124 X-Spam: Clean X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10042 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 bulkscore=0 mlxscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107120012 Cc: kernel-janitors@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: remove an unnecessary condition 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: , 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=6200 definitions=10042 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107120012 X-Proofpoint-ORIG-GUID: KKBUfKSi4iIQIwDuLO452MWx0b3ucwC- X-Proofpoint-GUID: KKBUfKSi4iIQIwDuLO452MWx0b3ucwC- On 7/8/21 10:16 PM, Dan Carpenter wrote: > The case where "tmp_oh" is NULL is handled at the start of the function. > At this point we know it's non-NULL so this will always return 1. > > Signed-off-by: Dan Carpenter Reviewed-by: Joseph Qi > --- > fs/ocfs2/dlmglue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c > index 48fd369c29a4..33fbdc823278 100644 > --- a/fs/ocfs2/dlmglue.c > +++ b/fs/ocfs2/dlmglue.c > @@ -2721,7 +2721,7 @@ int ocfs2_inode_lock_tracker(struct inode *inode, > return status; > } > } > - return tmp_oh ? 1 : 0; > + return 1; > } > > void ocfs2_inode_unlock_tracker(struct inode *inode, > _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel