From: Rahul Deshmukh Date: Thu, 7 Oct 2010 13:01:04 +0000 (+0530) Subject: b=22860 lnet_msg_alloc does double memset to zero X-Git-Tag: 2.0.53.0~10 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=8761239eb7ac080409384b8de61529f29767bda1 b=22860 lnet_msg_alloc does double memset to zero i=andreas i=liang --- diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index 1e6b72f..33f780d 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -337,13 +337,13 @@ lnet_msg_alloc(void) LIBCFS_ALLOC(msg, sizeof(*msg)); - if (msg != NULL) { - /* NULL pointers, clear flags etc */ - memset (msg, 0, sizeof (*msg)); + /* no need to zero, LIBCFS_ALLOC does for us */ + #ifdef CRAY_XT3 + if (msg != NULL) { msg->msg_ev.uid = LNET_UID_ANY; -#endif } +#endif return (msg); }