mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
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:
parent
c73395ec07
commit
3f68888c33
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user