Skip to contentSkip to conversation

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

DISCUSSION Alexey Dobriyan 2 participants 2 messages Aug 14, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

fs/ext3/balloc.c do_more: · line 354

Quoted 11 lines · On Fri, Aug 11, 2006 at 06:46:13PM -0700, [email protected] wrote:

Replace all brelse() calls with put_bh(). Because brelse() is old-fashioned, has a weird name and neelessly permits a NULL

fs/ext3/balloc.c renamed from fs/ext3/balloc.c~ext3-and-jbd-cleanup-replace-brelse-to-put_bh +1 -1
@@ -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"?

#2 lore raw
Quoted 4 lines · On Tue, 15 Aug 2006 02:59:41 +0400 Alexey Dobriyan <[email protected]> wrote:
Quoted 2 lines · On Fri, Aug 11, 2006 at 06:46:13PM -0700, [email protected] wrote:

Replace all brelse() calls with put_bh(). Because brelse() is old-fashioned, has a weird name and neelessly permits a NULL

Quoted 11 lines

fs/ext3/balloc.c do_more: · line 354

Quoted 8 lines
fs/ext3/balloc.c renamed from fs/ext3/balloc.c~ext3-and-jbd-cleanup-replace-brelse-to-put_bh +1 -1
@@ -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.