aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 269763b66361..7cce96a6935e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2179,7 +2179,21 @@ static void ext4_free_data(handle_t *handle, struct inode *inode,
2179 2179
2180 if (this_bh) { 2180 if (this_bh) {
2181 BUFFER_TRACE(this_bh, "call ext4_journal_dirty_metadata"); 2181 BUFFER_TRACE(this_bh, "call ext4_journal_dirty_metadata");
2182 ext4_journal_dirty_metadata(handle, this_bh); 2182
2183 /*
2184 * The buffer head should have an attached journal head at this
2185 * point. However, if the data is corrupted and an indirect
2186 * block pointed to itself, it would have been detached when
2187 * the block was cleared. Check for this instead of OOPSing.
2188 */
2189 if (bh2jh(this_bh))
2190 ext4_journal_dirty_metadata(handle, this_bh);
2191 else
2192 ext4_error(inode->i_sb, __func__,
2193 "circular indirect block detected, "
2194 "inode=%lu, block=%llu",
2195 inode->i_ino,
2196 (unsigned long long) this_bh->b_blocknr);
2183 } 2197 }
2184} 2198}
2185 2199