summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2018-04-03 16:27:12 +0000
committerMike Marshall <hubcap@omnibond.com>2018-04-03 21:55:27 -0400
commita5135eeab2e5ca1b94f34dcb772cb30f9f390efc (patch)
treeb0dfd6a088635db87a807a8dbecdce12e93aaca8 /mm
parentdbcb5e7fc470c9daec9cb4ae463670f2047163e3 (diff)
orangefs: implement vm_ops->fault
Must retrieve size before running filemap_fault so the kernel has an up-to-date size. This should have been caught by xfstests generic/246, but it was masked by orangefs_new_inode, which set i_size to PAGE_SIZE. When nothing caused a getattr prior to a pagefault, i_size was still PAGE_SIZE. Since xfstests only read 10 bytes, it did not catch this bug. When orangefs_new_inode was modified to perform a getattr instead, i_size was set to zero, as it was a newly created file. Then orangefs_file_write_iter did NOT set i_size. Instead it invalidated the attribute cache, which should have caused the next caller to retrieve i_size. But the fault handler did not know it was supposed to retrieve i_size. So during xfstests, i_size was still zero, and filemap_fault returned VM_FAULT_SIGBUS. Fixes xfstests generic/452. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions