[PATCH] readahead: ->prev_page can overrun the ahead window
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 22 Mar 2006 08:08:47 +0000 (00:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 22 Mar 2006 15:54:03 +0000 (07:54 -0800)
commita564da3964db3256069190c2ae95069143ac37fb
treeb7b9d66c1d6dde82db23222b16b0296013b1c3db
parentd15c023b44e5d323f1f4130b85d29f08e43433b1
[PATCH] readahead: ->prev_page can overrun the ahead window

If get_next_ra_size() does not grow fast enough, ->prev_page can overrun
the ahead window.  This means the caller will read the pages from
->ahead_start + ->ahead_size to ->prev_page synchronously.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Steven Pratt <slpratt@austin.ibm.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/readahead.c