DEVEL15-volprocs-alloc-vnode-instead-of-using-stack-20071126

don't use stack here; alloc memory for short term use


(cherry picked from commit 4f98eb48fccde9dd70708b2dd6b0903745d16b7a)
This commit is contained in:
Derrick Brashear 2007-11-26 22:12:04 +00:00
parent c73395ec07
commit 3f68888c33

View File

@ -203,14 +203,14 @@ ViceCreateRoot(Volume *vp)
struct acl_accessList *ACL;
ViceFid did;
Inode inodeNumber, nearInode;
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
struct VnodeDiskObject *vnode;
struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
IHandle_t *h;
FdHandle_t *fdP;
int code;
afs_fsize_t length;
vnode = (struct VnodeDiskObject *)malloc(SIZEOF_LARGEDISKVNODE);
memset(vnode, 0, SIZEOF_LARGEDISKVNODE);
V_pref(vp, nearInode);
@ -275,6 +275,7 @@ ViceCreateRoot(Volume *vp)
VNDISK_GET_LEN(length, vnode);
V_diskused(vp) = nBlocks(length);
free(vnode);
return 1;
}