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 <johal...@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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to