Displaying 1 result from an estimated 1 matches for "ext3_journal_extend".
2003 Feb 04
0
[PATCH] Fix signed use of i_blocks in ext3 truncate
...6,9 @@
*/
static int try_to_extend_transaction(handle_t *handle, struct inode *inode)
{
- long needed;
-
if (handle->h_buffer_credits > EXT3_RESERVE_TRANS_BLOCKS)
return 0;
- needed = inode->i_blocks;
- if (needed > EXT3_MAX_TRANS_DATA)
- needed = EXT3_MAX_TRANS_DATA;
- if (!ext3_journal_extend(handle, EXT3_RESERVE_TRANS_BLOCKS + needed))
+ if (!ext3_journal_extend(handle, blocks_for_truncate(inode)))
return 0;
return 1;
}
@@ -142,11 +160,8 @@
*/
static int ext3_journal_test_restart(handle_t *handle, struct inode *inode)
{
- long needed = inode->i_blocks;
- if (needed > EX...