Displaying 1 result from an estimated 1 matches for "ext3_set_bit".
Did you mean:
ext2_set_bit
2002 Apr 02
0
[patch] fix ext3 i_blocks accounting
...8 +645,7 @@ int ext3_new_block (handle_t *handle, st
}
/* No space left on the device */
- unlock_super (sb);
- return 0;
+ goto out;
search_back:
/*
@@ -694,6 +694,7 @@ got_block:
J_ASSERT_BH(bh, !ext3_test_bit(j, bh->b_data));
BUFFER_TRACE(bh, "setting bitmap bit");
ext3_set_bit(j, bh->b_data);
+ performed_allocation = 1;
#ifdef CONFIG_JBD_DEBUG
{
@@ -815,6 +816,11 @@ out:
ext3_std_error(sb, fatal);
}
unlock_super (sb);
+ /*
+ * Undo the block allocation
+ */
+ if (!performed_allocation)
+ DQUOT_FREE_BLOCK(inode, 1);
return 0;
}
-