Linux: Don't read pages beyond the cache eof
authorSimon Wilkinson <sxw@your-file-system.com>
Mon, 25 Apr 2011 18:18:39 +0000 (14:18 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 27 Apr 2011 17:39:25 +0000 (10:39 -0700)
commit79d5b5cce65b10134004c4cb2b7b34ac509cba6a
treeebc906dbba3433b7593b97049be54bb397feacf6
parent64c92b24447aa1a86a4557d6bab3a72b38640fce
Linux: Don't read pages beyond the cache eof

If we attempt to read past the end of the current cache file (for
example, when we're extending the file with ftruncate), don't force
the backend filesystem to populate that page with non-existent data.

This will hopefully fix a bus error when using tmpfs as a backing
cache.

FIXES 128452

Change-Id: I087aa1587885e97493130e5d05db6a1ed961181a
Reviewed-on: http://gerrit.openafs.org/4562
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c