]> err.no Git - linux-2.6/commit
AFS: fix interminable loop in afs_write_back_from_locked_page()
authorDavid Howells <dhowells@redhat.com>
Fri, 11 May 2007 05:22:19 +0000 (22:22 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 11 May 2007 15:29:32 +0000 (08:29 -0700)
commit9d577b6a31a53a19d3b0fe414d645a61ef201846
tree3e2523ac386e16eb0b125f3933b9ebfbd03aed65
parent9393e1dc8e394bd59217178b26b2476dc43e8667
AFS: fix interminable loop in afs_write_back_from_locked_page()

Following bug was uncovered by compiling with '-W' flag:

  CC [M]  fs/afs/write.o
fs/afs/write.c: In function â\80\98afs_write_back_from_locked_pageâ\80\99:
fs/afs/write.c:398: warning: comparison of unsigned expression >= 0 is always true

Loop variable 'n' is unsigned, so wraps around happily as far as I can
see. Trival fix attached (compile tested only).

Signed-off-by: Mika Kukkonen <mikukkon@iki.fi>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/afs/write.c