Implement file_inode() and call_mmap() helper functions in the LinuxKPI.

MFC after:	1 week
Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Sponsored by:	Mellanox Technologies
Sponsored by:	Limelight Networks
This commit is contained in:
Hans Petter Selasky 2018-02-18 08:40:07 +00:00
parent b15a13af6b
commit d51be3591a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329511

View File

@ -284,6 +284,20 @@ noop_llseek(struct linux_file *file, loff_t offset, int whence)
return (file->_file->f_offset);
}
static inline struct vnode *
file_inode(const struct linux_file *file)
{
return (file->f_vnode);
}
static inline int
call_mmap(struct linux_file *file, struct vm_area_struct *vma)
{
return (file->f_op->mmap(file, vma));
}
/* Shared memory support */
unsigned long linux_invalidate_mapping_pages(vm_object_t, pgoff_t, pgoff_t);
struct page *linux_shmem_read_mapping_page_gfp(vm_object_t, int, gfp_t);