svn commit: r203826 - head/sys/fs/msdosfs
Konstantin Belousov
kib at FreeBSD.org
Sat Feb 13 12:11:04 UTC 2010
Author: kib
Date: Sat Feb 13 12:11:03 2010
New Revision: 203826
URL: http://svn.freebsd.org/changeset/base/203826
Log:
Use M_ZERO instead of calling bzero().
Fix function name in the comment.
MFC after: 1 week
Modified:
head/sys/fs/msdosfs/msdosfs_denode.c
Modified: head/sys/fs/msdosfs/msdosfs_denode.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_denode.c Sat Feb 13 12:03:03 2010 (r203825)
+++ head/sys/fs/msdosfs/msdosfs_denode.c Sat Feb 13 12:11:03 2010 (r203826)
@@ -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.
*/
- 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;
More information about the svn-src-all
mailing list