Now that we're MPSAFE, tell namei() to acquire Giant if necessary.

This commit is contained in:
Dag-Erling Smørgrav 2007-04-22 08:41:52 +00:00
parent 70015002ce
commit 7621783a55

View File

@ -312,9 +312,11 @@ linprocfs_domtab(PFS_FILL_ARGS)
int error;
/* resolve symlinks etc. in the emulation tree prefix */
NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td);
NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td);
flep = NULL;
if (namei(&nd) != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0)
error = namei(&nd);
VFS_UNLOCK_GIANT(NDHASGIANT(&nd));
if (error != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0)
lep = linux_emul_path;
else
lep = dlep;