Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3374126imu; Wed, 7 Nov 2018 09:19:56 -0800 (PST) X-Google-Smtp-Source: AJdET5eRnmyw9jNeqfPuov2nuii5xFjHyObrwun+rPXduvqyJizpaK/UO5pI4k+csMH/c2jLLB8f X-Received: by 2002:a62:b87:: with SMTP id 7-v6mr1039879pfl.67.1541611196543; Wed, 07 Nov 2018 09:19:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541611196; cv=none; d=google.com; s=arc-20160816; b=OneePHWTOT/Pga6w6iCb6yDwEiTM3AxfR1Ft0csc94taxWwW7o1O529g7IV25S1+VK QvyCiXUVtecFuAaA5siBMQmjZuXXBZsL9r4fG4E0mMPPY6vSdGcNv4QM7GJPf5CgtbUv l6zn51Ok/sj4jXcxTH1MBmXDmlELDco11lhmGmeC4YPpEkVsUjDmRkVHVg3apmYxxC3i s12yUSc+ZBn5TFBB+Aybe73oSzSqZ5P5t7e2eFwR8ZWBiNaHd9+0Un3mr6hKaAsONrl9 evQ0Am/Vznk7E8GYiZILFyFI3yWRUPKJ4gjHdfgfWgYml+z7uQcuMN5tAL2Ijz2XGX9j tKDg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=8TFfy0pEMiT5cUgRawWa7JA1Ig+6+e1kbGFT0aaX35g=; b=IzN4ppduhI0wAueITsyQq4LzGT+DKw2Pv8doMQO+MbLTskOsN9q/XsxIOgL4HULL5U RA7pe7jjq48LZIo0t0FfdaUONH9zwUer8CARqdu3djUcLdLZxA6qFn5x1oal/nElARP1 vHf/GZttGR8SNWbU/HoIgDU0YWFwRHOdyUCNX8YYM/m0ZVb46wRwLMGFkNBcmZ4gZ8GJ /uw2lfCsKg2XWqcygm0JJ0hmYY/AIhL6ouKZPeH+MrgQKSbzg4csNUoDhvhsE+Z5Js8K PAwAZtC7Z7U/kDjkaURM7IMVoSVWjPodDcdYAsQZhPgQVKa5HgBf7YCV94yCbzaPedxC nrSQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37-v6si1114277plb.167.2018.11.07.09.19.40; Wed, 07 Nov 2018 09:19:56 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731506AbeKHCtg (ORCPT + 99 others); Wed, 7 Nov 2018 21:49:36 -0500 Received: from relay.sw.ru ([185.231.240.75]:37392 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731485AbeKHCtg (ORCPT ); Wed, 7 Nov 2018 21:49:36 -0500 Received: from [172.16.24.21] by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from ) id 1gKRT4-0003iq-7z; Wed, 07 Nov 2018 20:18:14 +0300 Subject: Re: [PATCH 1/7] ext4: lost brelse in __ext4_read_dirblock() To: "Theodore Y. Ts'o" , linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org References: <60f19df8-1e65-99a0-cb6b-696d1b530fd4@virtuozzo.com> <20181107152549.GB9919@thunk.org> From: Vasily Averin Message-ID: <6e5c9e17-5916-7296-35a0-cc0600a79f27@virtuozzo.com> Date: Wed, 7 Nov 2018 20:18:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181107152549.GB9919@thunk.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I was wrong here, but brelse is lost in next error in this function. I'll resend new patch. On 11/7/18 6:25 PM, Theodore Y. Ts'o wrote: > 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 >