Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5340810ybg; Tue, 22 Oct 2019 01:32:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0wwYdu5+I3TPRvAQsusSUoT37ZgzvHbevbrZ/CbldrE/h6T8LjBp4VzOMn1Rwud4ue2Pr X-Received: by 2002:aa7:c257:: with SMTP id y23mr29619065edo.39.1571733130203; Tue, 22 Oct 2019 01:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571733130; cv=none; d=google.com; s=arc-20160816; b=j7MxvETlCVvAu4t7Y5WK/lq/VVRHRHN/UoiJWQrb+hEOoEE4vVBduk/blkR1efn6sE MCge072r7K8Tg8DjbF7SJ9xAtvNPRE3wtlrxqdxJ4Ux64cz+fBunQXGfkYwLvjbvDw2Y SzO7hzAm3i2FElsszrR8LbEq/4AbwB6ltBFsllae3f2wL875f/5BIbgYvvCSDVDMO5qp 5XnuNoi85KEX1mw1wOtPbFFCkMWwvw7CseMzSTGzy4f5qqR4Rmro3NQTvfXHItCbxN9+ 6d/XxZc1eY09o/4QLw07+cysTyfYUHfFyFaSn4SypRVlfJEm0wzWXYafOhLtxFHBAQND rNbw== 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:message-id:subject:cc :to:from:date; bh=h6vpr9QZvLzdUUiCSfQf5hB/AY8V3jTaLeDSpf6aR5k=; b=xoPgTcS1NiOc+3FBZ6lThS/YU/2D4ClAtHxfiQlEKhAKVN73SbYb09Psh65lYS+sre 4txiRjHd0WDB26lNZPhpU2r6jdvZmQprpVmyMOgOftkKIfVAYP//xQAHFMgjx4Xjkb8A 0V+06e2tFXun51+KntDGMWbEboXIRfeMI85w/iSvStLoypyZf0MRf65pABnKRHWMzQMU 0UqlLEGHvb201xxUesHKprv4qPzzsx1xG0Qu/VZ2kMp9OZGwQy86UdmGFpLTVGs6fyG6 1b9ZT8HhgOh65WHIukrl5uzxHSlJ90H9xlx75T1zhIZ3Nwd37z4ARnvtYQY/KN6P2Qqf +2Hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 i12si11638585edb.133.2019.10.22.01.31.38; Tue, 22 Oct 2019 01:32:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388422AbfJVI2F (ORCPT + 99 others); Tue, 22 Oct 2019 04:28:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:39320 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388061AbfJVI2F (ORCPT ); Tue, 22 Oct 2019 04:28:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 43AECB3BD; Tue, 22 Oct 2019 08:28:04 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id A0B361E4812; Tue, 22 Oct 2019 10:28:03 +0200 (CEST) Date: Tue, 22 Oct 2019 10:28:03 +0200 From: Jan Kara To: Chengguang Xu Cc: jack@suse.com, linux-ext4@vger.kernel.org Subject: Re: [PATCH] ext2: add missing brelse in ext2_new_blocks() Message-ID: <20191022082803.GE2436@quack2.suse.cz> References: <20191022071045.7311-1-cgxu519@mykernel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191022071045.7311-1-cgxu519@mykernel.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue 22-10-19 15:10:45, Chengguang Xu wrote: > There is a missing brelse of bitmap_bh in the > case of retry. > > Signed-off-by: Chengguang Xu Good catch but please add a comment explaining that 'bitmap_bh' may be non-null because of retry. Thanks! Honza > --- > fs/ext2/balloc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c > index 924c1c765306..e8eedad479a7 100644 > --- a/fs/ext2/balloc.c > +++ b/fs/ext2/balloc.c > @@ -1313,6 +1313,7 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal, > if (free_blocks > 0) { > grp_target_blk = ((goal - le32_to_cpu(es->s_first_data_block)) % > EXT2_BLOCKS_PER_GROUP(sb)); > + brelse(bitmap_bh); > bitmap_bh = read_block_bitmap(sb, group_no); > if (!bitmap_bh) > goto io_error; > -- > 2.20.1 > > > -- Jan Kara SUSE Labs, CR