From: Mark Fasheh Date: Wed, 4 Oct 2006 00:53:05 +0000 (-0700) Subject: ocfs2: cond_resched() in ocfs2_zero_extend() X-Git-Tag: v2.6.19-rc3~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2057c5a63821e17c8a54dab6db680c77ce7ee6c;p=linux-2.6 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 --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index b499c32925..1be74c4e78 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -30,6 +30,7 @@ #include #include #include +#include #define MLOG_MASK_PREFIX ML_INODE #include @@ -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: