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

ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty



We need to call ext4_discard_reservation() earlier in ext4_truncate(),
to avoid a BUG() in ext4_mb_return_to_preallocation(), which is called
(ultimately) by ext4_free_blocks().  So we must ditch the blocks on
i_prealloc_list before we start freeing the data blocks.

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