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 <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10073
This commit is contained in:
Matthew Macy
2020-02-28 14:50:32 -08:00
committed by GitHub
parent 9cdf7b1f6b
commit ae9f92f6f3
7 changed files with 81 additions and 100 deletions
+13
View File
@@ -373,6 +373,19 @@ zfs_file_off(zfs_file_t *fp)
return (fp->f_pos);
}
/*
* 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
*