From 2dd71bd39eacde183dd81451c88e6d8c7fc9eb17 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 12 Jun 2013 11:43:02 -0400 Subject: [PATCH] --- yaml --- r: 377612 b: refs/heads/master c: 2ed5724d5a78a22864ef0bd6af4fcb8a15379f00 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/mballoc.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0781221c5c4b..5ee7b06976ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 20970ba65d5a22f2e4efbfa100377722fde56935 +refs/heads/master: 2ed5724d5a78a22864ef0bd6af4fcb8a15379f00 diff --git a/trunk/fs/ext4/mballoc.c b/trunk/fs/ext4/mballoc.c index def84082a9a9..1a9c22b45a01 100644 --- a/trunk/fs/ext4/mballoc.c +++ b/trunk/fs/ext4/mballoc.c @@ -2105,6 +2105,7 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) group = ac->ac_g_ex.fe_group; for (i = 0; i < ngroups; group++, i++) { + cond_resched(); /* * Artificially restricted ngroups for non-extent * files makes group > ngroups possible on first loop. @@ -4612,10 +4613,11 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, BUG_ON(bh && (count > 1)); for (i = 0; i < count; i++) { + cond_resched(); if (!bh) tbh = sb_find_get_block(inode->i_sb, block + i); - if (unlikely(!tbh)) + if (!tbh) continue; ext4_forget(handle, flags & EXT4_FREE_BLOCKS_METADATA, inode, tbh, block + i);