summaryrefslogtreecommitdiffstats
path: root/module/zfs/dnode.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-27 10:55:07 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 08:38:47 -0700
commit5ac1241a9527df92f6631459127d8b2a985a8f29 (patch)
tree33b2987543b0f2434fa3f30489fadc099b409d7b /module/zfs/dnode.c
parent1e33ac1e2677c898a0b5ef6207048c692cb51bf4 (diff)
Fix dnode_move() scope
The dnode_move() functionality is only used in the kernel build. As such we should be careful to wrap all of the related code with '#ifdef _KERNEL' to avoid gcc warnings about unused code.
Diffstat (limited to 'module/zfs/dnode.c')
-rw-r--r--module/zfs/dnode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c
index a7ae39e9d..1dd73cc98 100644
--- a/module/zfs/dnode.c
+++ b/module/zfs/dnode.c
@@ -57,7 +57,9 @@ ASSERTV(static dnode_phys_t dnode_phys_zero);
int zfs_default_bs = SPA_MINBLOCKSHIFT;
int zfs_default_ibs = DN_MAX_INDBLKSHIFT;
+#ifdef _KERNEL
static kmem_cbrc_t dnode_move(void *, void *, size_t, void *);
+#endif /* _KERNEL */
/* ARGSUSED */
static int
@@ -625,6 +627,7 @@ dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
mutex_exit(&dn->dn_mtx);
}
+#ifdef _KERNEL
#ifdef DNODE_STATS
static struct {
uint64_t dms_dnode_invalid;
@@ -775,7 +778,6 @@ dnode_move_impl(dnode_t *odn, dnode_t *ndn)
odn->dn_moved = (uint8_t)-1;
}
-#ifdef _KERNEL
/*ARGSUSED*/
static kmem_cbrc_t
dnode_move(void *buf, void *newbuf, size_t size, void *arg)