diff options
Diffstat (limited to 'fs/ocfs2')
-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 @@ | |||
30 | #include <linux/highmem.h> | 30 | #include <linux/highmem.h> |
31 | #include <linux/pagemap.h> | 31 | #include <linux/pagemap.h> |
32 | #include <linux/uio.h> | 32 | #include <linux/uio.h> |
33 | #include <linux/sched.h> | ||
33 | 34 | ||
34 | #define MLOG_MASK_PREFIX ML_INODE | 35 | #define MLOG_MASK_PREFIX ML_INODE |
35 | #include <cluster/masklog.h> | 36 | #include <cluster/masklog.h> |
@@ -691,6 +692,12 @@ static int ocfs2_zero_extend(struct inode *inode, | |||
691 | } | 692 | } |
692 | 693 | ||
693 | start_off += sb->s_blocksize; | 694 | start_off += sb->s_blocksize; |
695 | |||
696 | /* | ||
697 | * Very large extends have the potential to lock up | ||
698 | * the cpu for extended periods of time. | ||
699 | */ | ||
700 | cond_resched(); | ||
694 | } | 701 | } |
695 | 702 | ||
696 | out: | 703 | out: |