Date: Thu, 28 Jun 2007 11:35:52 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 122477 for review Message-ID: <200706281135.l5SBZqgt042259@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122477 Change 122477 by rdivacky@rdivacky_witten on 2007/06/28 11:35:09 Various fixes suggested by rwatson. Affected files ... .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#38 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#38 (text+ko) ==== @@ -1876,7 +1876,7 @@ int error; struct nameidata nd; int vfslocked; - + restart: if (dvp) vrele(dvp); @@ -2148,12 +2148,12 @@ kern_accessat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags) { - int error; struct nameidata nd; struct vnode *dvp; struct ucred *cred, *tmpcred; struct vnode *vp; int vfslocked; + int error; error = kern_get_at(td, fd, &dvp); if (error && !kern_absolute_path(path, pathseg)) @@ -2400,14 +2400,10 @@ NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_vp); VFS_UNLOCK_GIANT(vfslocked); - /* dont bother with the path as this is hopefully going away soon */ if (mtx_owned(&Giant)) - printf("stat(%d):\n", vfslocked); - if (error) - goto out; - *sbp = sb; - - error = 0; + printf("stat(%d): %s\n", vfslocked, path); + if (error == 0) + *sbp = sb; out: if (dvp) vrele(dvp); @@ -2461,8 +2457,7 @@ return (error); NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | NOFOLLOW | LOCKLEAF | - LOCKSHARED | AUDITVNODE1 | MPSAFE, pathseg, path, td, dvp); - + LOCKSHARED | MPSAFE | AUDITVNODE1, pathseg, path, td, dvp); if ((error = namei(&nd)) != 0) goto out; vfslocked = NDHASGIANT(&nd); @@ -2471,10 +2466,8 @@ NDFREE(&nd, NDF_ONLY_PNBUF); vput(vp); VFS_UNLOCK_GIANT(vfslocked); - if (error) - goto out; - *sbp = sb; - error = 0; + if (error == 0) + *sbp = sb; out: if (dvp) vrele(dvp); @@ -3371,8 +3364,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | AUDITVNODE1 | - MPSAFE, pathseg, path, td, dvp); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | MPSAFE | + AUDITVNODE1, pathseg, path, td, dvp); if ((error = getutimes(tptr, tptrseg, ts)) != 0) goto out;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706281135.l5SBZqgt042259>