From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francis Moreau Subject: Re: [PATCH] ext2_free_inode(): remove useless call to brelse() Date: Tue, 13 Apr 2010 11:02:56 +0200 Message-ID: References: <38b2ab8a1003260607p42382139te0be1a4ba4b3b8bc@mail.gmail.com> <20100408095747.GB20488@quack.suse.cz> <20100408100112.GC20488@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from mail-bw0-f219.google.com ([209.85.218.219]:51400 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817Ab0DMJC6 convert rfc822-to-8bit (ORCPT ); Tue, 13 Apr 2010 05:02:58 -0400 Received: by bwz19 with SMTP id 19so22183bwz.21 for ; Tue, 13 Apr 2010 02:02:57 -0700 (PDT) In-Reply-To: <20100408100112.GC20488@quack.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Apr 8, 2010 at 12:01 PM, Jan Kara wrote: > On Thu 08-04-10 11:57:48, Jan Kara wrote: >> On Fri 26-03-10 14:07:00, Francis Moreau wrote: >> > This patch removes a useless call to brelse(bitmap_bh) since at th= at >> > point bitmap_bh is NULL. >> > >> > It also converts the last brelse(bitmap_bh) into a __brelse(bitmap= _bh) >> > since at that point bitmap_bh is no more NULL. >> =A0 The cleanup looks fine. Only I'd use normal brelse instead of __= brelse >> at the end. The compiler should figure out itself that the check is >> unnecessary (if not, the cost of extra test is negligible in that pa= th >> anyway) and you don't have to think twice when looking at the functi= on. >> Also you don't have to initialize bitmap_bh to NULL after your clean= ups. >> So I've taken your patch with these two minor changes. > =A0Just for reference, here's the patch I currently carry. > ok, thanks --=20 =46rancis -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html