1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Instead of stating GIANT_REQUIRED, just acquire and release Giant where

needed.  This does not make a difference now, but will when procfs is
marked MPSAFE.
This commit is contained in:
Dag-Erling Smørgrav 2007-04-15 17:06:09 +00:00
parent 78c3440e7d
commit b1f9e8cec9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168763

View File

@ -91,8 +91,6 @@ procfs_doprocmap(PFS_FILL_ARGS)
int wrap32 = 0;
#endif
GIANT_REQUIRED;
PROC_LOCK(p);
error = p_candebug(td, p);
PROC_UNLOCK(p);
@ -112,6 +110,9 @@ procfs_doprocmap(PFS_FILL_ARGS)
wrap32 = 1;
}
#endif
mtx_lock(&Giant);
error = 0;
if (map != &curthread->td_proc->p_vmspace->vm_map)
vm_map_lock_read(map);
@ -213,5 +214,7 @@ procfs_doprocmap(PFS_FILL_ARGS)
if (map != &curthread->td_proc->p_vmspace->vm_map)
vm_map_unlock_read(map);
mtx_unlock(&Giant);
return (error);
}