Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp926694imd; Sat, 3 Nov 2018 13:20:45 -0700 (PDT) X-Google-Smtp-Source: AJdET5c5O5MZehdzT4aIKoA41sEVGO3ToXgz7j+JTk/53duOFhaqkR/wOc1PQEmvTUQ2YCH1zc8J X-Received: by 2002:a65:4683:: with SMTP id h3mr14435265pgr.225.1541276445927; Sat, 03 Nov 2018 13:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541276445; cv=none; d=google.com; s=arc-20160816; b=aArg6DXspAh8H4p7Z81aOs9QXxxTOPFlOMpOZNSYJOwX9TKFZV9wDPqKOinC5r4wUf cjiea0uPaV+clrbR1GByiNNU8Ty0CoboWNOaDsdxHhulkOLjxarMIceLmILXaNEuIWGQ 2rYvDghvNiJGtxEGVcCEaeE2NgJpHTNNDWAMWS7aaWL13vmffNdn+hZKu/IxnHyPcM/A 0wil8BqZOwJ1cS6GNzPGkbF1+jx3FgH1+CALS+rt02W8afl6eZ0OZ/c9n1y1kh3y5CUs 1ua8YuWl/Zgro8ejNI37UX7yYWtEj6OQQDBqD+BU1alpRJqhDonOIUujiV9V7F1ZQ0I/ FxyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=04otD9+1wMF2MBh2/HAu5rZZcBxbR3P6w0Rx5h2Fcsw=; b=VoAKH5nydoaF7VMCuvWQyednT+frbc8aTHEx6Mv08qKnFv5Q1j9N8BfImCisWvUQYB hEr4aehkwORTeOSEmxPFbHEETCKP23Jqy7A25nRvWfq5ufumBXlvZ45dIs1jbDt6O7cQ jSmv4GE21oeaOL/hdHDXOlbSV5KCkFESocodpV9QyVZVbag4wvzQyAYTL3eZfnpaxNwE lEx5ePU5ZLmT2aajvisoRLRIYYrMQhSitzjdn9X9KUIoRB/RQw6mqKutsOyyDJV/ijnt OS0CRfMUR4g6EbMLZfSkOIGy0kzWTstyaQPUD7c5d+dkkhjVM9uHCaN/8b1atcCAS3G8 oe3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=xXBM+BcC; 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 x4-v6si36991325plv.129.2018.11.03.13.20.30; Sat, 03 Nov 2018 13:20:45 -0700 (PDT) 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=fail header.i=@thunk.org header.s=ef5046eb header.b=xXBM+BcC; 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 S1727015AbeKDFc3 (ORCPT + 99 others); Sun, 4 Nov 2018 01:32:29 -0400 Received: from imap.thunk.org ([74.207.234.97]:33594 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbeKDFc3 (ORCPT ); Sun, 4 Nov 2018 01:32:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=04otD9+1wMF2MBh2/HAu5rZZcBxbR3P6w0Rx5h2Fcsw=; b=xXBM+BcCCXPbBaNFeBPe2VURrP I4EOCQHwIVVojAuIXiJuyBnmhwrR38X1zvXn+LteKQeyd9QiNOoNqiS1slZvuB/BO5HbNNtmrlBUz lTaCJYtcLvbdv1BbcojDVgDqUElO945s6LX2q0p/hFCX5uKcheDegYShEWM6bXeh8WqA=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1gJ2Op-00086V-Mx; Sat, 03 Nov 2018 20:20:03 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 8189D7A7A7E; Sat, 3 Nov 2018 16:20:02 -0400 (EDT) Date: Sat, 3 Nov 2018 16:20:02 -0400 From: "Theodore Y. Ts'o" To: Vasily Averin Cc: linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org, Yongqiang Yang , Yongqiang Yang Subject: Re: [PATCH v2 01/11] ext4 resise: extra brelse in setup_new_flex_group_blocks() Message-ID: <20181103202002.GE28850@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Vasily Averin , linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org, Yongqiang Yang , Yongqiang Yang References: <37de5906-2d76-461a-ff92-b6fcc775b408@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37de5906-2d76-461a-ff92-b6fcc775b408@virtuozzo.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 31, 2018 at 12:57:37AM +0300, Vasily Averin wrote: > currently bh is set to NULL only during first iteration of for cycle, > then this pointer is not cleared after end of using. > Therefore rollback after errors can lead to extra brelse(bh) call, > decrements bh counter and later trigger an unexpected warning in __brelse() > > Patch moves brelse() calls in body of cycle to exclude requirement of > brelse() call in rollback. > > Fixes 33afdcc5402d ("ext4: add a function which sets up group blocks ...") # 3.3+ > > Signed-off-by: Vasily Averin Thanks, applied. I addjusted the patch summary to read: ext4: avoid potential extra brelse in setup_new_flex_group_blocks() (Note that resise should have been spelled as "resize", by the way.) - Ted