From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 15:50:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E54C1065670; Sun, 15 Jul 2012 15:50:13 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 090E28FC17; Sun, 15 Jul 2012 15:50:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6FFoCKt056168; Sun, 15 Jul 2012 15:50:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FFoCMo056166; Sun, 15 Jul 2012 15:50:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151550.q6FFoCMo056166@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 15:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238491 - head/sys/fs/smbfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 15:50:13 -0000 Author: brueffer Date: Sun Jul 15 15:50:12 2012 New Revision: 238491 URL: http://svn.freebsd.org/changeset/base/238491 Log: Save a bzero() by using M_ZERO. Obtained from: Dragonfly BSD (change 4faaf07c3d7ddd120deed007370aaf4d90b72ebb) MFC after: 2 weeks Modified: head/sys/fs/smbfs/smbfs_node.c Modified: head/sys/fs/smbfs/smbfs_node.c ============================================================================== --- head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:23:31 2012 (r238490) +++ head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:50:12 2012 (r238491) @@ -223,7 +223,7 @@ loop: if (fap == NULL) return ENOENT; - np = malloc(sizeof *np, M_SMBNODE, M_WAITOK); + np = malloc(sizeof *np, M_SMBNODE, M_WAITOK | M_ZERO); error = getnewvnode("smbfs", mp, &smbfs_vnodeops, &vp); if (error) { free(np, M_SMBNODE); @@ -235,7 +235,6 @@ loop: return (error); } vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG; - bzero(np, sizeof(*np)); vp->v_data = np; np->n_vnode = vp; np->n_mount = VFSTOSMBFS(mp);