Skip to content
Commit bc965ab3 authored by Theodore Ts'o's avatar Theodore Ts'o
Browse files

ext4: Fix lack of credits BUG() when deleting a badly fragmented inode



The extents codepath for ext4_truncate() requests journal transaction
credits in very small chunks, requesting only what is needed.  This
means there may not be enough credits left on the transaction handle
after ext4_truncate() returns and then when ext4_delete_inode() tries
finish up its work, it may not have enough transaction credits,
causing a BUG() oops in the jbd2 core.

Also, reserve an extra 2 blocks when starting an ext4_delete_inode()
since we need to update the inode bitmap, as well as update the
orphaned inode linked list.

Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 0123c939
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