Re: + ext3-and-jbd-cleanup-replace-brelse-to-put_bh.patch added to-mm tree

From: Andrew Morton
Date: Mon Aug 14 2006 - 19:14:17 EST


On Tue, 15 Aug 2006 02:59:41 +0400
Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:

> On Fri, Aug 11, 2006 at 06:46:13PM -0700, akpm@xxxxxxxx wrote:
> > Replace all brelse() calls with put_bh(). Because brelse() is
> > old-fashioned, has a weird name and neelessly permits a NULL
>
> > --- a/fs/ext3/balloc.c~ext3-and-jbd-cleanup-replace-brelse-to-put_bh
> > +++ a/fs/ext3/balloc.c
> > @@ -351,7 +351,7 @@ do_more:
> > overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb);
> > count -= overflow;
> > }
> > - brelse(bitmap_bh);
> > + put_bh(bitmap_bh);
>
> Is it safe to always s/brelse/put_bh/ ? Or someone has to audit every
> occurence for this "neelessly permits a NULL"?

Yeah, it crashed all over the place.

I'd be inclined to give up on this idea. Life's too short.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/