ext3 truncate fix
PATCH 22/27 ext3 truncate fix
Forward-port of a fix which Stephen has applied to ext3's 2.4 CVS tree.
Fix for a rare problem seen under stress in data=journal mode: if we have to restart a truncate transaction while traversing the inode's direct blocks, we need to deal with bh==NULL in ext3_clear_blocks.
inode.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
fs/ext3/inode.c renamed from fs/ext3/inode.c~ext3-truncate-fix +4 -2
@@ -1632,8 +1632,10 @@ ext3_clear_blocks(handle_t *handle, stru }ext3_mark_inode_dirty (handle, inode);ext3_journal_test_restart (handle, inode); -BUFFER_TRACE (bh,"get_write_access" ); -ext3_journal_get_write_access (handle, bh); +if (bh) { +BUFFER_TRACE (bh,"retaking write access" ); +ext3_journal_get_write_access (handle, bh); + } }/*
-