aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArvind Sankar <[email protected]>2020-06-09 18:59:04 -0400
committerBrian Behlendorf <[email protected]>2020-06-18 12:18:49 -0700
commit1fa5c7af3314b4c556bd86e3a49e3497a5ed72ed (patch)
tree03b7d1d655dd2ef453ecd269e31d09a975d9a6a0 /lib
parentf734301d2267cbb33eaffbca195fc93f1dae7b74 (diff)
Cleanup libzpool/kernel.c
Commit ec213971274a ("async zvol minor node creation interferes with receive") replaced zvol_create_minors with zvol_create_minor and zvol_create_minors_recursive, changing the prototype at the same time. However the stub functions in libzpool/kernel.c were defined with the old prototype. As the definitions are empty, this doesn't cause any runtime issues, but an LTO build shows warnings because of the mismatched prototypes. Commit a0bd735adb1b ("Add support for asynchronous zvol minor operations") removed the real zvol_remove_minor, but for some reason added a stub implementation in libzpool/kernel.c with no references. Delete this dead code. Commit 196bee4cfd57 ("Remove deduplicated send/receive code") removed zfs_onexit_del_cb and zfs_onexit_cb_data. Drop the stubs as well. Add zvol.h include to provide prototypes, and sort the include directives. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Arvind Sankar <[email protected]> Closes #10470
Diffstat (limited to 'lib')
-rw-r--r--lib/libzpool/kernel.c41
1 files changed, 12 insertions, 29 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
index f19ebac12..10465ebfc 100644
--- a/lib/libzpool/kernel.c
+++ b/lib/libzpool/kernel.c
@@ -26,22 +26,24 @@
#include <assert.h>
#include <fcntl.h>
+#include <libgen.h>
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <zlib.h>
-#include <libgen.h>
-#include <sys/spa.h>
-#include <sys/stat.h>
+#include <sys/crypto/icp.h>
#include <sys/processor.h>
-#include <sys/zfs_context.h>
#include <sys/rrwlock.h>
-#include <sys/utsname.h>
-#include <sys/time.h>
+#include <sys/spa.h>
+#include <sys/stat.h>
#include <sys/systeminfo.h>
+#include <sys/time.h>
+#include <sys/utsname.h>
+#include <sys/zfs_context.h>
+#include <sys/zfs_onexit.h>
+#include <sys/zvol.h>
#include <zfs_fletcher.h>
-#include <sys/crypto/icp.h>
+#include <zlib.h>
/*
* Emulation of kernel services in userland.
@@ -973,20 +975,6 @@ zfs_onexit_add_cb(minor_t minor, void (*func)(void *), void *data,
return (0);
}
-/* ARGSUSED */
-int
-zfs_onexit_del_cb(minor_t minor, uint64_t action_handle, boolean_t fire)
-{
- return (0);
-}
-
-/* ARGSUSED */
-int
-zfs_onexit_cb_data(minor_t minor, uint64_t action_handle, void **data)
-{
- return (0);
-}
-
fstrans_cookie_t
spl_fstrans_mark(void)
{
@@ -1013,17 +1001,12 @@ kmem_cache_reap_active(void)
void *zvol_tag = "zvol_tag";
void
-zvol_create_minor(spa_t *spa, const char *name, boolean_t async)
-{
-}
-
-void
-zvol_create_minors_recursive(spa_t *spa, const char *name, boolean_t async)
+zvol_create_minor(const char *name)
{
}
void
-zvol_remove_minor(spa_t *spa, const char *name, boolean_t async)
+zvol_create_minors_recursive(const char *name)
{
}