changeset 13796:7f50f76414af

3134 nfs4: cleaning code in nfs4_xdr Reviewed by: Eric Schrock <eric.schrock@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Vitaliy Gusev <gusev.vitaliy@nexenta.com>
date Tue, 28 Aug 2012 19:48:04 -0500
parents caa31a28c302
children 271108bf13d7
files usr/src/uts/common/fs/nfs/nfs4_xdr.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/nfs/nfs4_xdr.c	Wed Aug 29 11:37:19 2012 -0500
+++ b/usr/src/uts/common/fs/nfs/nfs4_xdr.c	Tue Aug 28 19:48:04 2012 -0500
@@ -22,6 +22,9 @@
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ */
 
 /*
  * A handcoded version based on the original rpcgen code.
@@ -3946,15 +3949,14 @@
 		 * These should be ordered by frequency of use
 		 */
 		switch (array[i].argop) {
-		case OP_PUTFH:
-			if (array[i].nfs_argop4_u.opputfh.object.nfs_fh4_val !=
-			    NULL) {
-				kmem_free(array[i].nfs_argop4_u.opputfh.object.
-				    nfs_fh4_val,
-				    array[i].nfs_argop4_u.opputfh.object.
-				    nfs_fh4_len);
+		case OP_PUTFH: {
+			nfs_fh4 *objp = &array[i].nfs_argop4_u.opputfh.object;
+
+			if (objp->nfs_fh4_val != NULL) {
+				kmem_free(objp->nfs_fh4_val, objp->nfs_fh4_len);
 			}
 			continue;
+		}
 		case OP_GETATTR:
 		case OP_GETFH:
 			continue;