diff options
-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 b499c32..1be74c4 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: |