diff options
author | hselasky <hselasky@FreeBSD.org> | 2018-02-25 10:31:27 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2018-02-25 10:31:27 +0000 |
commit | df1e3738395eb202a2257affc9074284c1638494 (patch) | |
tree | b981a7252b0dd47daa6dbeff874f5c8fff99dd49 | |
parent | 863bc6f793b68fd75336cfdd782755b6932641d2 (diff) | |
download | FreeBSD-src-df1e3738395eb202a2257affc9074284c1638494.zip FreeBSD-src-df1e3738395eb202a2257affc9074284c1638494.tar.gz |
MFC r329511:
Implement file_inode() and call_mmap() helper functions in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index 66aae53..e05debf 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -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); |