Module Name:    src
Committed By:   riastradh
Date:           Thu Mar 19 17:16:22 UTC 2015

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs: dmu.c

Log Message:
Move initialization of XUIO_XUZC_PRIV out of #ifdef PORT_SOLARIS.

This code is not currently used, so no functional change, but it may
be used when we hook zfs into the ubc.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c:1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c:1.4
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c:1.3	Sat Feb 27 23:43:53 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c	Thu Mar 19 17:16:22 2015
@@ -679,14 +679,15 @@ dmu_xuio_init(xuio_t *xuio, int nblk)
 	priv->cnt = nblk;
 	priv->bufs = kmem_zalloc(nblk * sizeof (arc_buf_t *), KM_SLEEP);
 	priv->iovp = uio->uio_iov;
-#ifdef PORT_SOLARIS
 	XUIO_XUZC_PRIV(xuio) = priv;
 
+#ifdef PORT_SOLARIS
 	if (XUIO_XUZC_RW(xuio) == UIO_READ)
 		XUIOSTAT_INCR(xuiostat_onloan_rbuf, nblk);
 	else
 		XUIOSTAT_INCR(xuiostat_onloan_wbuf, nblk);
 #endif
+
 	return (0);
 }
 
@@ -699,12 +700,13 @@ dmu_xuio_fini(xuio_t *xuio)
 	kmem_free(priv->iovp, nblk * sizeof (iovec_t));
 	kmem_free(priv->bufs, nblk * sizeof (arc_buf_t *));
 	kmem_free(priv, sizeof (dmu_xuio_t));
+
 #ifdef PORT_SOLARIS
 	if (XUIO_XUZC_RW(xuio) == UIO_READ)
 		XUIOSTAT_INCR(xuiostat_onloan_rbuf, -nblk);
 	else
 		XUIOSTAT_INCR(xuiostat_onloan_wbuf, -nblk);
-#endif	
+#endif
 }
 
 /*

Reply via email to