Skip to content

Commit

Permalink
ocfs2: cond_resched() in ocfs2_zero_extend()
Browse files Browse the repository at this point in the history
The loop within ocfs2_zero_extend() can execute for a long time, causing
spurious soft lockup warnings.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Mark Fasheh committed Oct 20, 2006
1 parent 0effef7 commit e2057c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/highmem.h>
#include <linux/pagemap.h>
#include <linux/uio.h>
#include <linux/sched.h>

#define MLOG_MASK_PREFIX ML_INODE
#include <cluster/masklog.h>
Expand Down Expand Up @@ -691,6 +692,12 @@ static int ocfs2_zero_extend(struct inode *inode,
}

start_off += sb->s_blocksize;

/*
* Very large extends have the potential to lock up
* the cpu for extended periods of time.
*/
cond_resched();
}

out:
Expand Down

0 comments on commit e2057c5

Please sign in to comment.