Commit 65fe40ed authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] truncate_inode_pages latency fix

Fix scheduling latency issues with large truncates.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c3dfa712
...@@ -155,6 +155,7 @@ void truncate_inode_pages(struct address_space *mapping, loff_t lstart) ...@@ -155,6 +155,7 @@ void truncate_inode_pages(struct address_space *mapping, loff_t lstart)
next = start; next = start;
for ( ; ; ) { for ( ; ; ) {
cond_resched();
if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
if (next == start) if (next == start)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment