aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_onexit.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-10-13 19:19:39 -0700
committerBrian Behlendorf <[email protected]>2019-10-13 19:19:39 -0700
commitcdbba101f48bef68b46363a64880b51fa647ad45 (patch)
treeea372ffbaf25453daed0dd28d379eab66bab5a27 /module/zfs/zfs_onexit.c
parentc32470133273ab587fb3bd9b3324ccfb823f6fe6 (diff)
Move zfs_onexit_fd_hold to platform code
FreeBSD has a very different implementation. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9442
Diffstat (limited to 'module/zfs/zfs_onexit.c')
-rw-r--r--module/zfs/zfs_onexit.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/module/zfs/zfs_onexit.c b/module/zfs/zfs_onexit.c
index 31f77ce81..9f1f6e4e0 100644
--- a/module/zfs/zfs_onexit.c
+++ b/module/zfs/zfs_onexit.c
@@ -112,39 +112,6 @@ zfs_onexit_minor_to_state(minor_t minor, zfs_onexit_t **zo)
}
/*
- * Consumers might need to operate by minor number instead of fd, since
- * they might be running in another thread (e.g. txg_sync_thread). Callers
- * of this function must call zfs_onexit_fd_rele() when they're finished
- * using the minor number.
- */
-int
-zfs_onexit_fd_hold(int fd, minor_t *minorp)
-{
- file_t *fp;
- zfs_onexit_t *zo;
- int error;
-
- fp = getf(fd);
- if (fp == NULL)
- return (SET_ERROR(EBADF));
-
- error = zfsdev_getminor(fp->f_file, minorp);
- if (error == 0)
- error = zfs_onexit_minor_to_state(*minorp, &zo);
-
- if (error)
- zfs_onexit_fd_rele(fd);
-
- return (error);
-}
-
-void
-zfs_onexit_fd_rele(int fd)
-{
- releasef(fd);
-}
-
-/*
* Add a callback to be invoked when the calling process exits.
*/
int