Message ID | YLjMYy9E6U2/flhP@mwanda |
---|---|
State | Rejected |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=C7Xbtcvp; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2020-01-29 header.b=oDRjLsIw; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FwlkM0Mnvz9srX for <incoming@patchwork.ozlabs.org>; Thu, 3 Jun 2021 22:36:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3SjqcQ9Cl+fvdKz/VZcd2p3hkzVbSL/JwQCvnHYdlHg=; b=C7XbtcvpnmStYa 19Ph5lpdj/XgoALAUpGu+HbFeylEuhYWO9BdEkcAbrx9rRdIdKUiwP/ukyPhW+CwieSY7/t0nch/0 UnVFrN8I+FKLwgRJtTst5EhLSUyn6/ab3xbwXgP3q6QTAfrtMYi4CKhB2BXqnuMKzZH6+RxwMiCH0 X5RvhUPx2EsHzbZ8FYUMk8YUQjo/Ha0kIb1Bx+zZcejY/Sr8v/kbr8hTIszWAVhlysq/xPqTwveE/ gSmnohmj8ymchlVnpT9wFdO/kaAMEd/IDjAy/mo7c//dF2s206FLP0kZX2LivD7JCHSOQcx5L9I4b ci9jVg9JoKXsomXyGYvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lomYy-008exQ-Ed; Thu, 03 Jun 2021 12:35:04 +0000 Received: from aserp2130.oracle.com ([141.146.126.79]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lomYs-008ets-Qw for linux-mtd@lists.infradead.org; Thu, 03 Jun 2021 12:35:01 +0000 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 153CUv3S088402; Thu, 3 Jun 2021 12:34:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2020-01-29; bh=umhuKUbm8gjwABm6opsKffTVYqL1p4//Cl+iUJGjF40=; b=oDRjLsIwUsnhPRd89rA8XCd6AFnRJ1HdwWCBtljjvA6/svAgCjaEmwKOkk1MWK/Vvwu6 ri2EjvIZWVsboOtt+6Xu/mk/CXbj1wKsKcDKzGH/aXLqxY9lERGB/zBNlvAV2HabZpIC oWRoRKsWKgzsbfy1uYGos22n2AEXwlioGbQwgKWv+EjMIrvJDYN1ud9r3f/PGSALRyUE S6PJ50PYml3exfTslXESedPtWhcTf2qo42ZdNpG6LUaqAr9d6VQ4wvyj5SBOwx+lOLy4 IapCzZJZL+ER+zOGasHxvG1F81piMtZVOcoR+hCkRo+ZRqx3h/Dud68vCpkyxEIcwdTx 2A== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2130.oracle.com with ESMTP id 38ub4cu953-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 03 Jun 2021 12:34:53 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 153CVpxK114924; Thu, 3 Jun 2021 12:34:53 GMT Received: from pps.reinject (localhost [127.0.0.1]) by aserp3020.oracle.com with ESMTP id 38udeevu57-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 03 Jun 2021 12:34:53 +0000 Received: from aserp3020.oracle.com (aserp3020.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 153CY0XV128340; Thu, 3 Jun 2021 12:34:52 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 38udeevu3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 03 Jun 2021 12:34:52 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 153CYorj003418; Thu, 3 Jun 2021 12:34:51 GMT Received: from mwanda (/10.175.206.145) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 03 Jun 2021 12:34:49 +0000 Date: Thu, 3 Jun 2021 15:34:43 +0300 From: Dan Carpenter <dan.carpenter@oracle.com> To: Richard Weinberger <richard@nod.at> Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>, Adrian Hunter <ext-adrian.hunter@nokia.com>, linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH] ubifs: fix an IS_ERR() vs NULL check Message-ID: <YLjMYy9E6U2/flhP@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Proofpoint-GUID: oiKughyiwmpH2gMde8IxRVk0DRcxAxMM X-Proofpoint-ORIG-GUID: oiKughyiwmpH2gMde8IxRVk0DRcxAxMM X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10003 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 clxscore=1011 impostorscore=0 adultscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106030085 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210603_053459_007790_CBB0D3FA X-CRM114-Status: GOOD ( 15.07 ) X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The ubifs_fast_find_frdi_idx() function returns NULL on error, it doesn't return error pointers. Update the check accordingly. Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- fs/ubifs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [141.146.126.79 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [141.146.126.79 listed in list.dnswl.org] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines -0.0 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
ubifs: fix an IS_ERR() vs NULL check
|
expand
|
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index dc3e26e9ed7b..7cc22d7317ea 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c @@ -895,8 +895,8 @@ int ubifs_gc_start_commit(struct ubifs_info *c) /* Record index freeable LEBs for unmapping after commit */ while (1) { lp = ubifs_fast_find_frdi_idx(c); - if (IS_ERR(lp)) { - err = PTR_ERR(lp); + if (!lp) { + err = -ENOMEM; goto out; } if (!lp)
The ubifs_fast_find_frdi_idx() function returns NULL on error, it doesn't return error pointers. Update the check accordingly. Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- fs/ubifs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)