Commit 6a8b2bb1 authored by Hans Reiser's avatar Hans Reiser Committed by Linus Torvalds

[PATCH] fix ReiserFS metadata journalling

This patch is to add forgotten metadata journaling for a case when
we free blocks after tail conversion failures. Found and fixed by Chris Mason
parent 90db7115
......@@ -745,8 +745,12 @@ int reiserfs_get_block (struct inode * inode, sector_t block,
if (retval) {
if ( retval != -ENOSPC )
printk("clm-6004: convert tail failed inode %lu, error %d\n", inode->i_ino, retval) ;
if (allocated_block_nr)
if (allocated_block_nr) {
/* the bitmap, the super, and the stat data == 3 */
journal_begin(&th, inode->i_sb, 3) ;
reiserfs_free_block (&th, allocated_block_nr);
transaction_started = 1 ;
}
goto failure ;
}
goto research ;
......
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