]> git.baikalelectronics.ru Git - kernel.git/commit
writeback: fix break condition
authorFederico Cuello <fedux@lugmen.org.ar>
Wed, 11 Feb 2009 21:04:39 +0000 (13:04 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Feb 2009 22:25:37 +0000 (14:25 -0800)
commit8347996826b67fbc76db64a6f65f5c5c3cad7a0c
tree350162d8019af504c6f0461b2f54606bd6af7142
parentba4f531efc007dd07909e0bea8d7ee74b36a22eb
writeback: fix break condition

Commit 1cb7a60c15ba4a8c06852920a00deb9dd2f6b057 ("write-back: fix
nr_to_write counter") fixed nr_to_write counter, but didn't set the break
condition properly.

If nr_to_write == 0 after being decremented it will loop one more time
before setting done = 1 and breaking the loop.

[akpm@linux-foundation.org: coding-style fixes]
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page-writeback.c