Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3249390imu; Wed, 7 Nov 2018 07:26:37 -0800 (PST) X-Google-Smtp-Source: AJdET5fRLwvsd4WPqU9LQ1TIIkb0f2BdoErwm9MvAxjnDy6OxqBNrBC0Wvty8tq5zFIi87ZsGW3j X-Received: by 2002:a63:4566:: with SMTP id u38mr565996pgk.4.1541604396866; Wed, 07 Nov 2018 07:26:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541604396; cv=none; d=google.com; s=arc-20160816; b=v4Mk9EGgjrJEOPWMeEkc6Ozlj+PYXUdEcCwAwzr1FWQNd4Pt/tAnHB3hG6c4Pb/DcU mgsMTlBHFAC2eaP+/ah6g1jtE3kNeAd2B910xbGNNm1qPt34jnasuQC5XNgakvU+5mCc vdMjNoHHj7GHZOiAi8xm877l0TKapHswa/k9R197A4XQe8GQ5niu2d/oWpZ6/mTZ6GD7 EdzQagTO/2dWTFQztD0LBaD8yzXBINLwqcT9FJ+tklp2np8c/4pMwF/sG1bb2zF21ouw qxr6wT+PKUY0n50Vq25nqrpWur1/k5s8N08yFSFJSwqg+zKlRJ0TaYsx0qUXS6cd4sF3 UpnQ== 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=ZeYb+xBNhiWS7emnLY4af3tCaj+iG0cuinpBw5wTrZA=; b=B1gt35IXccS71kmNbc7r9hUf6B/sIycQ32S6nU+objy1n1JDmEwLmiViBATkzk6TIe gtsKLIPGy3MY5DO5iJ1zknPsbs0AeOPPcy36dVncs9ExMyxGoUVl0C/gIqFBjICR1VrF 2b+aIKwKWiTzZ5XJqs3knon989BI1CGGbDia1sc2V4B0Y4u1T1bNiNZFoV4UQV3j7Si8 0ziV+3MhvlH4jB+zBUY2z+CKP+YUiYwBxh6FDOvhu0/tZ+gRdOPhM1TQUJKMWD59AoC8 hkE2znkJk9ad/osFnKzra0dDTSdPkGpFKzV0kP4QCpqBr0vxDq72Np/uWvaEK+LPjt88 66JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=i6eBBq8l; 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 r18si866109pgo.9.2018.11.07.07.26.21; Wed, 07 Nov 2018 07:26:36 -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=fail header.i=@thunk.org header.s=ef5046eb header.b=i6eBBq8l; 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 S1727771AbeKHA4k (ORCPT + 99 others); Wed, 7 Nov 2018 19:56:40 -0500 Received: from imap.thunk.org ([74.207.234.97]:49172 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727203AbeKHA4k (ORCPT ); Wed, 7 Nov 2018 19:56:40 -0500 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=ZeYb+xBNhiWS7emnLY4af3tCaj+iG0cuinpBw5wTrZA=; b=i6eBBq8l2ZF4GFj02hVkcKkPZO HkOsh6PsPObsys46JBgw3rXRzv3E6TQcWSFoKaQmvvvu7I8XJJRAhhKeVK+q+ndPijL7R4CFGMspy Xs8tewATGichb7PJ68zzoBBYR23swEFm69eCr8jklsyyZ+sEErAHS22T+gNpGE7sjTMI=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1gKPiH-0008Vg-VF; Wed, 07 Nov 2018 15:25:50 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 336657A7D10; Wed, 7 Nov 2018 10:25:49 -0500 (EST) Date: Wed, 7 Nov 2018 10:25:49 -0500 From: "Theodore Y. Ts'o" To: Vasily Averin Cc: linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] ext4: lost brelse in __ext4_read_dirblock() Message-ID: <20181107152549.GB9919@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Vasily Averin , linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org References: <60f19df8-1e65-99a0-cb6b-696d1b530fd4@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60f19df8-1e65-99a0-cb6b-696d1b530fd4@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 10:12:18PM +0300, Vasily Averin wrote: > Fixes dc6982ff4db1 ("ext4: refactor code to read directory blocks ...") # 3.9 > > Signed-off-by: Vasily Averin > --- > fs/ext4/namei.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > index d388cce72db2..1a21e59ede72 100644 > --- a/fs/ext4/namei.c > +++ b/fs/ext4/namei.c > @@ -111,6 +111,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode, > if (!bh) { > ext4_error_inode(inode, func, line, block, > "Directory hole found"); > + brelse(bh); > return ERR_PTR(-EFSCORRUPTED); > } > dirent = (struct ext4_dir_entry *) bh->b_data; Inside the conditional, bh == NULL, so the brelse isn't needed. Cheers, - Ted