From: Anton Blanchard Date: Mon, 13 Jun 2011 21:31:12 +0000 (+0100) Subject: afs: afs_fill_page reads too much, or wrong data X-Git-Tag: v3.0-rc4~28^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e7f23373bf9a853e9256e81e86724cdd0a33c29;p=pandora-kernel.git afs: afs_fill_page reads too much, or wrong data afs_fill_page should read the page that is about to be written but the current implementation has a number of issues. If we aren't extending the file we always read PAGE_CACHE_SIZE at offset 0. If we are extending the file we try to read the entire file. Change afs_fill_page to read PAGE_CACHE_SIZE at the right offset, clamped to i_size. While here, avoid calling afs_fill_page when we are doing a PAGE_CACHE_SIZE write. Signed-off-by: Anton Blanchard Signed-off-by: David Howells Signed-off-by: Al Viro --- Reading git-diff-tree failed