Commit e2de7edb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] reiserfs: truncate leak fix

From: Chris Mason <mason@suse.com>

reiserfs_unmap_buffer should clean and wait on all buffers.  This fixes a
leak under fsx workloads.
parent 008c597b
......@@ -139,11 +139,10 @@ int direct2indirect (struct reiserfs_transaction_handle *th, struct inode * inod
/* stolen from fs/buffer.c */
void reiserfs_unmap_buffer(struct buffer_head *bh) {
if (buffer_mapped(bh)) {
lock_buffer(bh) ;
if (buffer_journaled(bh) || buffer_journal_dirty(bh)) {
BUG() ;
}
lock_buffer(bh) ;
clear_buffer_dirty(bh) ;
/* Remove the buffer from whatever list it belongs to. We are mostly
interested in removing it from per-sb j_dirty_buffers list, to avoid
......@@ -161,7 +160,6 @@ void reiserfs_unmap_buffer(struct buffer_head *bh) {
clear_buffer_new(bh);
bh->b_bdev = NULL;
unlock_buffer(bh) ;
}
}
static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment