diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-10-04 02:53:05 +0200 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-10-21 00:27:48 +0200 |
commit | e2057c5a63821e17c8a54dab6db680c77ce7ee6c (patch) | |
tree | 411465feea60aafd3bacbaec2fffb42af6e7bfe2 /fs | |
parent | ocfs2: fix page zeroing during simple extends (diff) | |
download | linux-e2057c5a63821e17c8a54dab6db680c77ce7ee6c.tar.xz linux-e2057c5a63821e17c8a54dab6db680c77ce7ee6c.zip |
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 <mark.fasheh@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index b499c329257b..1be74c4e7814 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -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> @@ -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: |