Date: Sun, 18 Feb 2018 08:40:07 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329511 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201802180840.w1I8e7Pm006862@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Sun Feb 18 08:40:07 2018 New Revision: 329511 URL: https://svnweb.freebsd.org/changeset/base/329511 Log: 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 Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Sun Feb 18 08:29:25 2018 (r329510) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Sun Feb 18 08:40:07 2018 (r329511) @@ -284,6 +284,20 @@ noop_llseek(struct linux_file *file, loff_t offset, in 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802180840.w1I8e7Pm006862>