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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 13de1dd751f5..c420aaba6e9c 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4121,6 +4121,8 @@ static void ext4_clear_blocks(handle_t *handle, struct inode *inode,
4121 __le32 *last) 4121 __le32 *last)
4122{ 4122{
4123 __le32 *p; 4123 __le32 *p;
4124 int is_metadata = S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode);
4125
4124 if (try_to_extend_transaction(handle, inode)) { 4126 if (try_to_extend_transaction(handle, inode)) {
4125 if (bh) { 4127 if (bh) {
4126 BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata"); 4128 BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata");
@@ -4151,11 +4153,11 @@ static void ext4_clear_blocks(handle_t *handle, struct inode *inode,
4151 4153
4152 *p = 0; 4154 *p = 0;
4153 tbh = sb_find_get_block(inode->i_sb, nr); 4155 tbh = sb_find_get_block(inode->i_sb, nr);
4154 ext4_forget(handle, 0, inode, tbh, nr); 4156 ext4_forget(handle, is_metadata, inode, tbh, nr);
4155 } 4157 }
4156 } 4158 }
4157 4159
4158 ext4_free_blocks(handle, inode, block_to_free, count, 0); 4160 ext4_free_blocks(handle, inode, block_to_free, count, is_metadata);
4159} 4161}
4160 4162
4161/** 4163/**