mm: write_cache_pages terminate quickly
authorNick Piggin <npiggin@suse.de>
Tue, 6 Jan 2009 22:39:11 +0000 (14:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:00 +0000 (15:59 -0800)
commitd5482cdf8a0aacb1e6468a97d5544f5829c8d8c4
tree3565702c805deecd51e32ed1458f567a0064815d
parent515f4a037fb9ab736f8bad733fcd2ffd350cf265
mm: write_cache_pages terminate quickly

Terminate the write_cache_pages loop upon encountering the first page past
end, without locking the page.  Pages cannot have their index change when
we have a reference on them (truncate, eg truncate_inode_pages_range
performs the same check without the page lock).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page-writeback.c