Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1449093pxu; Mon, 23 Nov 2020 23:49:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJytXzO3HZgsPbA6dOmgKgn/s3VIMolGLJwMtVcN+lcIWHolQmuqN4dC4HlfbOeEvvZK5b07 X-Received: by 2002:a50:a40f:: with SMTP id u15mr2805186edb.307.1606204148893; Mon, 23 Nov 2020 23:49:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606204148; cv=none; d=google.com; s=arc-20160816; b=kOpWNBlOIZuXHfPO6a4E+aPzxnXZtaKDAqFx2zKZUFJLhmsNr4oQnc7KnyOnjUyztK 1JN/G9ecxLtsxtRGqEEcnsF9/Qfwj0LZxoS7m1sYwJl0nX7QN/przLlqi4dCblr5+/1D t2Mgwh8PQxml/TI2cPyWnzqLyfkfz4UlA5tik6msUyYh5sTTm05BxxcecdELHqgQEmJ5 +HcXhXnIo8FrtdOn04Z2nsMAYISaEGroQDGTz1PdANTjKiADnELQZLviqRbiU6uArM7b lFkyXo5Q4aWG6l/r5lVWuWgJXzQsTuRLvp4zZB9CzT+dshd2YLwx3ey5zgTrNcORYORI LgGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vKr5ETp3C5KqK3mod0jaM+mKM4DvTeDNLHMLBjhX3Do=; b=uwNDOwDG3eapVV8bYra4WnxjPYAzMldyRZXQ9ojablN9olIbexclNtBYzMAKebd899 sENy/G1b5dfZ8Fl5cLldmE+01yGsKBi8Mjn5RUqfM7qsQHLeJUyeOC7L6OVNuwN606Lo pNr8tKRvgvsyKhZG/7My+ezm8FhnYRhjKvQmH/i/xrNUc2y5iJKsJNcWtSf3UliPOlux eBQD7Jd9a0EFzHnMEUm8nGv3ZmDCbDZXdt/8Auqm/U6td59xovksSxUXb4arOZpNi9VE GXW/Zfo48r2IXrSbJXIWrjNe8lk0goFKUYRdgBwj+m9ypzgWURZCd1MJdpCy7lXD554A apIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si8100662edi.314.2020.11.23.23.48.45; Mon, 23 Nov 2020 23:49:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730192AbgKXHn5 (ORCPT + 99 others); Tue, 24 Nov 2020 02:43:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbgKXHn4 (ORCPT ); Tue, 24 Nov 2020 02:43:56 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66D21C0613CF for ; Mon, 23 Nov 2020 23:43:56 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khSzP-0008VX-5r; Tue, 24 Nov 2020 08:43:51 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1khSzO-0008M5-GP; Tue, 24 Nov 2020 08:43:50 +0100 Date: Tue, 24 Nov 2020 08:43:50 +0100 From: Sascha Hauer To: Wang ShaoBo Cc: richard@nod.at, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, huawei.libin@huawei.com, cj.chengjian@huawei.com Subject: Re: [PATCH] bdi: Fix error return code in alloc_wbufs() Message-ID: <20201124074350.GM24489@pengutronix.de> References: <20201115082343.35645-1-bobo.shaobowang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201115082343.35645-1-bobo.shaobowang@huawei.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:42:29 up 278 days, 15:12, 76 users, load average: 0.14, 0.16, 0.16 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 15, 2020 at 04:23:43PM +0800, Wang ShaoBo wrote: > Fix to return PTR_ERR() error code from the error handling case instead > fo 0 in function alloc_wbufs(), as done elsewhere in this function. > > Fixes: 6a98bc4614de ("ubifs: Add authentication nodes to journal") > Signed-off-by: Wang ShaoBo > --- > fs/ubifs/super.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Prefix for this patch should be "ubifs:" rather than "bdi:". With this: Reviewed-by: Sascha Hauer Sascha > > diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c > index cb3acfb7dd1f..dacbb999ae34 100644 > --- a/fs/ubifs/super.c > +++ b/fs/ubifs/super.c > @@ -838,8 +838,10 @@ static int alloc_wbufs(struct ubifs_info *c) > c->jheads[i].wbuf.jhead = i; > c->jheads[i].grouped = 1; > c->jheads[i].log_hash = ubifs_hash_get_desc(c); > - if (IS_ERR(c->jheads[i].log_hash)) > + if (IS_ERR(c->jheads[i].log_hash)) { > + err = PTR_ERR(c->jheads[i].log_hash); > goto out; > + } > } > > /* > -- > 2.25.1 > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |