Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2958429imu; Mon, 19 Nov 2018 08:37:39 -0800 (PST) X-Google-Smtp-Source: AJdET5dkWtJ/hInIQK8E5C2uR+0Qkuj8UEjEep36cNqK5qvf4CtdfDJ1pbJf6P1tF8fLJxYEifCh X-Received: by 2002:a65:41c2:: with SMTP id b2mr20491891pgq.67.1542645459599; Mon, 19 Nov 2018 08:37:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645459; cv=none; d=google.com; s=arc-20160816; b=z0eGEinj1LDACDblmQD2eOQ05RvI8kqzpZ//RriNSxfNb0mzctWqCc/Npf7R/Q1jNc N4saY9harSbeQq+lmJfCzJg6+i/G5Tqi+uzb5HpSd3CHGZB0CiHj5ynhZwnDZHFKQ+Sa Qv+OrXNCLqEaNz5RwxfPYJzJobthcWzqE6oEM0yaIMeheTnJhMPX6rLMzA/tj6qm6dL2 RYOg02vBj5QDN11/8ACYfkq6Y7UzEviYuWZBVofW0SOrXcs05z3FP6AWkdTUO1ESGbTy 9y70lNNsjYiodm6aMhDay1miV3Z7PUMETeEX+Y9R+1RYm0PSdKlpzVZdnPuYEbDqvLzF f2lA== 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=VEs/HxZBWIjFZJ4p/WwqSdA697MHDpdn9HH5fNtpg18=; b=ix7+C+tqWae8ec2I04KFJQMjbuuhahUXsG2UH/8DeB1Yk4i5mMjdgfmZzGORpdsKUa w8ia+dijNVN2vns37iTbCi38CHUhmD/VRMMngCAnDhL2O0WzzFPQaqYQgw4rvEqAhT7t UT5ecIQWrR/M+ZSLNi0WyXq53hSAYRaSCBLGQcFSuSvAz0YC8Ev2StQLjoWiFueZWBFY IwXr55N5hVZZBWrQf0fbG8SvLdHBA8l7LrWSNyPFanXUYZAPX9hCur3WeLyrNKGY8U3g mW9QgTf2iuxwonzBX9O+2NCHVB+DGDnxiZAsDMTcRW0meF4cRNiadx/2NerTdfujKhHI yeCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D5OX+E8g; 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 23si24987101pfk.287.2018.11.19.08.37.25; Mon, 19 Nov 2018 08:37:39 -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=D5OX+E8g; 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 S1731812AbeKTDAJ (ORCPT + 99 others); Mon, 19 Nov 2018 22:00:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:59910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730366AbeKTDAI (ORCPT ); Mon, 19 Nov 2018 22:00:08 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 A423E214C4; Mon, 19 Nov 2018 16:35:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645360; bh=Psk8i/19oaK+R5V0Rkuvxxam5qtGj4/SGTiMo1U2Wy8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5OX+E8gkVYKYxKuBWtAbhM9HTl4GiZyqAuSjmJs+hm8OvmR3X1qHX1JFPcSYSn9d ACVqU13o6lE1QfquCfIeiX7oLj7jdgddlDK9ZkLRUx4mNRqswentiZDEjhziBFcI0H 0ojzbqMnIIilkVBc5CTveDwHnWroOKWwFPgTkV3c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Averin , Theodore Tso , stable@kernel.org Subject: [PATCH 4.19 132/205] ext4: add missing brelse() add_new_gdb_meta_bg()s error path Date: Mon, 19 Nov 2018 17:27:19 +0100 Message-Id: <20181119162637.105927705@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vasily Averin commit 61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0 upstream. Fixes: 01f795f9e0d6 ("ext4: add online resizing support for meta_bg ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.7 Signed-off-by: Greg Kroah-Hartman --- fs/ext4/resize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -926,6 +926,7 @@ static int add_new_gdb_meta_bg(struct su sizeof(struct buffer_head *), GFP_NOFS); if (!n_group_desc) { + brelse(gdb_bh); err = -ENOMEM; ext4_warning(sb, "not enough memory for %lu groups", gdb_num + 1); @@ -941,8 +942,6 @@ static int add_new_gdb_meta_bg(struct su kvfree(o_group_desc); BUFFER_TRACE(gdb_bh, "get_write_access"); err = ext4_journal_get_write_access(handle, gdb_bh); - if (unlikely(err)) - brelse(gdb_bh); return err; }