Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11812038pjo; Thu, 2 Jan 2020 14:42:29 -0800 (PST) X-Google-Smtp-Source: APXvYqy8SHBlfDhTa2l7yY7lrZC/xHPeG+EeVL5nFCXedxgEIHT3bbNHWDaQCocvqIpRRKqv7jJX X-Received: by 2002:a9d:367:: with SMTP id 94mr89578632otv.329.1578004949191; Thu, 02 Jan 2020 14:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578004949; cv=none; d=google.com; s=arc-20160816; b=f/uHaeizRXXSq/fLxngAVLBa3NWHxwGGNnk9ACNw+n/yqnoIsSEyqb7gjrW6hN7uAt Yc3JaMrM+aHnzH7uL8u6fhWP6WEv51GnUuyRC4vg9oyucToqlp5qhhEuWlK4uiZjWtPX B3zDpUx/lqy+eXFZPHenZbUxxQ+Us0LoYd3Juuji1gy3CkKe0nlgq7ew7Mnn92mN7euv Z8sF1yoqYjqPcibPKpzcBnxuRnn4nRCkHnFX8ZhZk1HY/jct+eci9i8OS/Kdo66cHdq3 EFqG+AJoPGWEGJSipoUiZ9JZR3InjPFBMBNDVn2G7PDWrpntyQPoNABhwi9sXTM44u8a 2R7A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2wnNltbv5lGt4lBRSOUa08Fh6AUxC44CpbYB3W/cb0U=; b=o2JRety5Mpkq209W8/HCrRL0aZzOtYjAQqIB3UNd4AGsmYfeKGjrvgWTJ5PnAuAZ9c 7t/amvNVIcpyGqFx5/zUMYxGDqZCHeYfdTsVWgqjKRMVBXaWPs1DWPYm8zcKuuqpFmxy 9IrZ0Fi1r6O73LWkTEPtV22W1sT/O4riBl9LvDY7e6pXue37NZHuLbxmnSA+d+7ROmGE qz9199SiAf9xBRB2aDLVzoDu8KKfXa/1P7xwJeIFvfkN3Bc8xI+IejKHI5vk9I/CBcT0 hcnPydCSvjNoGjFIDc5lFMvm6zcVt/q4sTiGZ95SxjbpiF1FzLb+RlknePTsCgLMIWt6 x+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uoV43hYj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si29053813otm.224.2020.01.02.14.42.17; Thu, 02 Jan 2020 14:42:29 -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=@kernel.org header.s=default header.b=uoV43hYj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731117AbgABWkI (ORCPT + 99 others); Thu, 2 Jan 2020 17:40:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:53080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731328AbgABWik (ORCPT ); Thu, 2 Jan 2020 17:38:40 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2378D21835; Thu, 2 Jan 2020 22:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004719; bh=YQaGtvdPkCyGlkVgJ0R45zBbXZGNYd7ph6U3pDQ7TXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uoV43hYjcoLNN9X9k+ojHTeHYD6ZHZrXiu61YhdMPVtD1lJYpjhQkKFpa50xIaMWl jx7qZspOEnP6ztRKcGMnnoQnwSsUtectqxOEq9Nk9yRnHnVuAyymToMyGNhl5AwSvs 8YEBglH/jm0NzSN58y2pfcduW0lrE+aosnzFUz1c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ding Xiang , Joseph Qi , Mark Fasheh , Joel Becker , Junxiao Bi , Changwei Ge , Gang He , Jun Piao , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.4 125/137] ocfs2: fix passing zero to PTR_ERR warning Date: Thu, 2 Jan 2020 23:08:18 +0100 Message-Id: <20200102220604.007998694@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ding Xiang [ Upstream commit 188c523e1c271d537f3c9f55b6b65bf4476de32f ] Fix a static code checker warning: fs/ocfs2/acl.c:331 ocfs2_acl_chmod() warn: passing zero to 'PTR_ERR' Link: http://lkml.kernel.org/r/1dee278b-6c96-eec2-ce76-fe6e07c6e20f@linux.alibaba.com Fixes: 5ee0fbd50fd ("ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang") Signed-off-by: Ding Xiang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- fs/ocfs2/acl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c index 1e0d8da0d3cd..80b92120c812 100644 --- a/fs/ocfs2/acl.c +++ b/fs/ocfs2/acl.c @@ -338,8 +338,8 @@ int ocfs2_acl_chmod(struct inode *inode, struct buffer_head *bh) down_read(&OCFS2_I(inode)->ip_xattr_sem); acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, bh); up_read(&OCFS2_I(inode)->ip_xattr_sem); - if (IS_ERR(acl) || !acl) - return PTR_ERR(acl); + if (IS_ERR_OR_NULL(acl)) + return PTR_ERR_OR_ZERO(acl); ret = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); if (ret) return ret; -- 2.20.1