diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/mballoc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index def84082a9a9..1a9c22b45a01 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -2105,6 +2105,7 @@ repeat: | |||
2105 | group = ac->ac_g_ex.fe_group; | 2105 | group = ac->ac_g_ex.fe_group; |
2106 | 2106 | ||
2107 | for (i = 0; i < ngroups; group++, i++) { | 2107 | for (i = 0; i < ngroups; group++, i++) { |
2108 | cond_resched(); | ||
2108 | /* | 2109 | /* |
2109 | * Artificially restricted ngroups for non-extent | 2110 | * Artificially restricted ngroups for non-extent |
2110 | * files makes group > ngroups possible on first loop. | 2111 | * files makes group > ngroups possible on first loop. |
@@ -4612,10 +4613,11 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, | |||
4612 | BUG_ON(bh && (count > 1)); | 4613 | BUG_ON(bh && (count > 1)); |
4613 | 4614 | ||
4614 | for (i = 0; i < count; i++) { | 4615 | for (i = 0; i < count; i++) { |
4616 | cond_resched(); | ||
4615 | if (!bh) | 4617 | if (!bh) |
4616 | tbh = sb_find_get_block(inode->i_sb, | 4618 | tbh = sb_find_get_block(inode->i_sb, |
4617 | block + i); | 4619 | block + i); |
4618 | if (unlikely(!tbh)) | 4620 | if (!tbh) |
4619 | continue; | 4621 | continue; |
4620 | ext4_forget(handle, flags & EXT4_FREE_BLOCKS_METADATA, | 4622 | ext4_forget(handle, flags & EXT4_FREE_BLOCKS_METADATA, |
4621 | inode, tbh, block + i); | 4623 | inode, tbh, block + i); |