patch-2.4.0-test2 linux/fs/nfsd/nfsxdr.c

Next file: linux/fs/nfsd/vfs.c
Previous file: linux/fs/nfsd/nfsfh.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/fs/nfsd/nfsxdr.c linux/fs/nfsd/nfsxdr.c
@@ -412,11 +412,9 @@
 		cd->eob = 1;
 		return -EINVAL;
 	}
-	*p++ = xdr_one;			/* mark entry present */
-	*p++ = htonl((u32) ino);	/* file id */
-	*p++ = htonl((u32) namlen);	/* name length & name */
-	memcpy(p, name, namlen);
-	p += slen;
+	*p++ = xdr_one;				/* mark entry present */
+	*p++ = htonl((u32) ino);		/* file id */
+	p    = xdr_encode_array(p, name, namlen);/* name length & name */
 	cd->offset = p;			/* remember pointer */
 	*p++ = ~(u32) 0;		/* offset of next entry */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)