From nobody Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Thu, 19 Oct 2006 12:07:59 -0700 Subject: ocfs2: cond_resched() in ocfs2_zero_extend() The loop within ocfs2_zero_extend() can execute for a long time, causing spurious soft lockup warnings. Signed-off-by: Mark Fasheh --- fs/ocfs2/file.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) b7eb28bada001433f61b0c824ccd1ace6bd22a03 diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 462e727..7bbce0a 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -30,6 +30,7 @@ #include #include #include #include +#include #define MLOG_MASK_PREFIX ML_INODE #include @@ -690,6 +691,12 @@ static int ocfs2_zero_extend(struct inod } start_off += sb->s_blocksize; + + /* + * Very large extends have the potential to lock up + * the cpu for extended periods of time. + */ + cond_resched(); } out: -- 1.3.3