mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +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;
|
struct acl_accessList *ACL;
|
||||||
ViceFid did;
|
ViceFid did;
|
||||||
Inode inodeNumber, nearInode;
|
Inode inodeNumber, nearInode;
|
||||||
char buf[SIZEOF_LARGEDISKVNODE];
|
struct VnodeDiskObject *vnode;
|
||||||
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
|
|
||||||
struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
|
struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
|
||||||
IHandle_t *h;
|
IHandle_t *h;
|
||||||
FdHandle_t *fdP;
|
FdHandle_t *fdP;
|
||||||
int code;
|
int code;
|
||||||
afs_fsize_t length;
|
afs_fsize_t length;
|
||||||
|
|
||||||
|
vnode = (struct VnodeDiskObject *)malloc(SIZEOF_LARGEDISKVNODE);
|
||||||
memset(vnode, 0, SIZEOF_LARGEDISKVNODE);
|
memset(vnode, 0, SIZEOF_LARGEDISKVNODE);
|
||||||
|
|
||||||
V_pref(vp, nearInode);
|
V_pref(vp, nearInode);
|
||||||
@ -275,6 +275,7 @@ ViceCreateRoot(Volume *vp)
|
|||||||
VNDISK_GET_LEN(length, vnode);
|
VNDISK_GET_LEN(length, vnode);
|
||||||
V_diskused(vp) = nBlocks(length);
|
V_diskused(vp) = nBlocks(length);
|
||||||
|
|
||||||
|
free(vnode);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user