aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/zfs_file_os.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-02-28 14:50:32 -0800
committerGitHub <[email protected]>2020-02-28 14:50:32 -0800
commitae9f92f6f31c81f4d1aa4602f812f912b4392e7c (patch)
tree1d9c28079e96eb6746a53140d7c2c02e5f945b8c /module/os/linux/zfs/zfs_file_os.c
parent9cdf7b1f6b00cdd0a31d07e3fbc679d0e9eff247 (diff)
Re-share zfsdev_getminor and zfs_onexit_fd_hold
By adding a zfs_file_private accessor to the common interfaces and some extensions to FreeBSD platform code it is now possible to share the implementations for the aforementioned functions. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10073
Diffstat (limited to 'module/os/linux/zfs/zfs_file_os.c')
-rw-r--r--module/os/linux/zfs/zfs_file_os.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zfs_file_os.c b/module/os/linux/zfs/zfs_file_os.c
index 1c9b84d66..99c6ffc95 100644
--- a/module/os/linux/zfs/zfs_file_os.c
+++ b/module/os/linux/zfs/zfs_file_os.c
@@ -374,6 +374,19 @@ zfs_file_off(zfs_file_t *fp)
}
/*
+ * Request file pointer private data
+ *
+ * fp - pointer to file
+ *
+ * Returns pointer to file private data.
+ */
+void *
+zfs_file_private(zfs_file_t *fp)
+{
+ return (fp->private_data);
+}
+
+/*
* unlink file
*
* path - fully qualified file path