Lines 294-299
zpl_mmap(struct file *filp, struct vm_area_struct *vma)
Link Here
|
294 |
if (error) |
294 |
if (error) |
295 |
return (error); |
295 |
return (error); |
296 |
|
296 |
|
|
|
297 |
vma->vm_ops = &zpl_file_vm_ops; |
298 |
|
297 |
mutex_enter(&zp->z_lock); |
299 |
mutex_enter(&zp->z_lock); |
298 |
zp->z_is_mapped = 1; |
300 |
zp->z_is_mapped = 1; |
299 |
mutex_exit(&zp->z_lock); |
301 |
mutex_exit(&zp->z_lock); |
Lines 433-438
zpl_fallocate(struct file *filp, int mode, loff_t offset, loff_t len)
Link Here
|
433 |
} |
435 |
} |
434 |
#endif /* HAVE_FILE_FALLOCATE */ |
436 |
#endif /* HAVE_FILE_FALLOCATE */ |
435 |
|
437 |
|
|
|
438 |
int zpl_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
439 |
{ |
440 |
int error = filemap_page_mkwrite(vma, vmf); |
441 |
|
442 |
if (VM_FAULT_NOPAGE != error) |
443 |
zfs_inode_update(ITOZ(vma->vm_file->f_path.dentry->d_inode)); |
444 |
|
445 |
return error; |
446 |
} |
447 |
|
436 |
const struct address_space_operations zpl_address_space_operations = { |
448 |
const struct address_space_operations zpl_address_space_operations = { |
437 |
.readpages = zpl_readpages, |
449 |
.readpages = zpl_readpages, |
438 |
.readpage = zpl_readpage, |
450 |
.readpage = zpl_readpage, |
Lines 460-462
const struct file_operations zpl_dir_file_operations = {
Link Here
|
460 |
.readdir = zpl_readdir, |
472 |
.readdir = zpl_readdir, |
461 |
.fsync = zpl_fsync, |
473 |
.fsync = zpl_fsync, |
462 |
}; |
474 |
}; |
|
|
475 |
|
476 |
const struct vm_operations_struct zpl_file_vm_ops = { |
477 |
.page_mkwrite = zpl_page_mkwrite, |
478 |
.fault = filemap_fault, |
479 |
}; |