]> git.itanic.dy.fi Git - linux-stable/commit
mm: write_cache_pages terminate quickly
authorNick Piggin <npiggin@suse.de>
Tue, 6 Jan 2009 22:39:11 +0000 (14:39 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 25 Jan 2009 00:41:48 +0000 (16:41 -0800)
commita70a6c20de762257d778f719503837ce816e8f05
treea6d09006932880b2bdf0d0edc813cb98a98a1e93
parenteac622ef3017044053f24584f5aa233d069078f7
mm: write_cache_pages terminate quickly

commit d5482cdf8a0aacb1e6468a97d5544f5829c8d8c4 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/page-writeback.c