Date: Sat, 20 Feb 2010 11:58:19 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r204114 - stable/8/sys/fs/msdosfs Message-ID: <201002201158.o1KBwJbM096082@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Feb 20 11:58:19 2010 New Revision: 204114 URL: http://svn.freebsd.org/changeset/base/204114 Log: MFC r203826: Use M_ZERO instead of calling bzero(). Fix function name in the comment. MFC r203828: Fix function name in the comment in the second location too. Modified: stable/8/sys/fs/msdosfs/msdosfs_denode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- stable/8/sys/fs/msdosfs/msdosfs_denode.c Sat Feb 20 11:54:18 2010 (r204113) +++ stable/8/sys/fs/msdosfs/msdosfs_denode.c Sat Feb 20 11:58:19 2010 (r204114) @@ -144,11 +144,11 @@ deget(pmp, dirclust, diroffset, depp) } /* - * Do the MALLOC before the getnewvnode since doing so afterward + * Do the malloc before the getnewvnode since doing so afterward * might cause a bogus v_data pointer to get dereferenced - * elsewhere if MALLOC should block. + * elsewhere if malloc should block. */ - ldep = malloc(sizeof(struct denode), M_MSDOSFSNODE, M_WAITOK); + ldep = malloc(sizeof(struct denode), M_MSDOSFSNODE, M_WAITOK | M_ZERO); /* * Directory entry was not in cache, have to create a vnode and @@ -161,7 +161,6 @@ deget(pmp, dirclust, diroffset, depp) free(ldep, M_MSDOSFSNODE); return error; } - bzero((caddr_t)ldep, sizeof *ldep); nvp->v_data = ldep; ldep->de_vnode = nvp; ldep->de_flag = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002201158.o1KBwJbM096082>