1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

The debug.sizeof.znode sysctl returns an int, not a size_t. This can cause

a hang on 64-bit platforms.

MFC after:	1 week
PR:		amd64/123456
Submitted by:	KOIE Hidetaka | hide koie.org
This commit is contained in:
John Baldwin 2008-05-07 17:55:28 +00:00
parent 02e50214ff
commit 9227912617
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178832

View File

@ -69,7 +69,8 @@ zfs_filestat(struct vnode *vp, struct filestat *fsp)
void *znodeptr, *vnodeptr;
char *dataptr;
int *zphys_addr;
size_t len, size;
size_t len;
int size;
len = sizeof(size);
if (sysctlbyname("debug.sizeof.znode", &size, &len, NULL, 0) == -1) {
@ -91,7 +92,7 @@ zfs_filestat(struct vnode *vp, struct filestat *fsp)
}
/*
* z_id field is stored in the third pointer. We therefor skip the two
* z_id field is stored in the third pointer. We therefore skip the two
* first bytes.
*
* Pointer to the z_phys structure is the next last pointer. Therefore