[PATCH] grow_buffers() infinite loop fix
authorAndrew Morton <akpm@osdl.org>
Wed, 11 Oct 2006 08:21:46 +0000 (01:21 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 11 Oct 2006 18:14:21 +0000 (11:14 -0700)
commite5657933863f43cc6bb76a54d659303dafaa9e58
tree7f6351194953b0d167ea79749d9fcaf9ae7f6a1f
parente0ab2928cc2202f13f0574d4c6f567f166d307eb
[PATCH] grow_buffers() infinite loop fix

If grow_buffers() is for some reason passed a block number which wants to lie
outside the maximum-addressable pagecache range (PAGE_SIZE * 4G bytes) then it
will accidentally truncate `index' and will then instnatiate a page at the
wrong pagecache offset.  This causes __getblk_slow() to go into an infinite
loop.

This can happen with corrupted disks, or with software errors elsewhere.

Detect that, and handle it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/buffer.c