]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Eliminate zfsdev_get_state_impl
authorRyan Moeller <freqlabs@FreeBSD.org>
Tue, 16 Mar 2021 12:44:23 +0000 (12:44 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 9 Apr 2021 04:17:18 +0000 (21:17 -0700)
After 3937ab20f zfsdev_get_state_impl can become zfsdev_get_state.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #11833

module/os/linux/zfs/zfs_ioctl_os.c
module/zfs/zfs_ioctl.c

index 9b7ab647d59107a6f77aa9d31169304a58011d63..e9ae4c2a589a37b853d61f24ec6aaf93a290e9de 100644 (file)
@@ -118,7 +118,7 @@ zfsdev_state_init(struct file *filp)
 
        /*
         * In order to provide for lock-free concurrent read access
-        * to the minor list in zfsdev_get_state_impl(), new entries
+        * to the minor list in zfsdev_get_state(), new entries
         * must be completely written before linking them into the
         * list whereas existing entries are already linked; the last
         * operation must be updating zs_minor (from -1 to the new
index 7f929df1675783b7e0450fd0eafdf246f8464aae..53f16cd3db3c5db2a69fb348f027cb4bf53cc3d0 100644 (file)
@@ -7352,8 +7352,8 @@ zfsdev_getminor(int fd, minor_t *minorp)
        return (SET_ERROR(EBADF));
 }
 
-static void *
-zfsdev_get_state_impl(minor_t minor, enum zfsdev_state_type which)
+void *
+zfsdev_get_state(minor_t minor, enum zfsdev_state_type which)
 {
        zfsdev_state_t *zs;
 
@@ -7374,16 +7374,6 @@ zfsdev_get_state_impl(minor_t minor, enum zfsdev_state_type which)
        return (NULL);
 }
 
-void *
-zfsdev_get_state(minor_t minor, enum zfsdev_state_type which)
-{
-       void *ptr;
-
-       ptr = zfsdev_get_state_impl(minor, which);
-
-       return (ptr);
-}
-
 /*
  * Find a free minor number.  The zfsdev_state_list is expected to
  * be short since it is only a list of currently open file handles.
@@ -7399,7 +7389,7 @@ zfsdev_minor_alloc(void)
        for (m = last_minor + 1; m != last_minor; m++) {
                if (m > ZFSDEV_MAX_MINOR)
                        m = 1;
-               if (zfsdev_get_state_impl(m, ZST_ALL) == NULL) {
+               if (zfsdev_get_state(m, ZST_ALL) == NULL) {
                        last_minor = m;
                        return (m);
                }