VOP_{LOOKUP|RENAME}(9) refer to cn_proc field ...

Alexey Neyman alex.neyman at auriga.ru
Thu May 29 18:39:45 UTC 2003


... while this field has been replaced with cn_thread. Also, cn_hash 
field is no longer present in struct componentname. Patch attached.

Regards,
Alexey.

-- 
,----------------------------------------,
| A quoi ca sert d'etre sur la terre     | Alexey V. Neyman
| Si c'est pour faire nos vies a genoux! | mailto:alex.neyman at auriga.ru
`------------------( Les Rois du Monde )-'
-------------- next part --------------
--- VOP_LOOKUP.9.orig	Thu May 29 22:29:51 2003
+++ VOP_LOOKUP.9	Thu May 29 22:31:38 2003
@@ -60,17 +60,16 @@
 	/*
 	 * Arguments to lookup.
 	 */
-	u_long	cn_nameiop;	/* namei operation */
-	u_long	cn_flags;	/* flags to namei */
-	struct	proc *cn_proc;	/* process requesting lookup */
-	struct	ucred *cn_cred;	/* credentials */
+	u_long	cn_nameiop;	   /* namei operation */
+	u_long	cn_flags;	   /* flags to namei */
+	struct	thread *cn_thread; /* thread requesting lookup */
+	struct	ucred *cn_cred;	   /* credentials */
 	/*
 	 * Shared between lookup and commit routines.
 	 */
 	char	*cn_pnbuf;	/* pathname buffer */
 	char	*cn_nameptr;	/* pointer to looked up name */
 	long	cn_namelen;	/* length of looked up component */
-	u_long	cn_hash;	/* hash value of looked up name */
 	long	cn_consume;	/* chars to consume in lookup() */
 };
 .Ed
@@ -176,7 +175,7 @@
     if (dvp->v_type != VDIR)
 	return ENOTDIR;
 
-    error = VOP_ACCESS(dvp, VEXEC, cred, cnp->cn_proc);
+    error = VOP_ACCESS(dvp, VEXEC, cred, cnp->cn_thread);
     if (error)
 	return (error);
 
@@ -296,7 +295,7 @@
 	    /*
 	     * Check for write access on directory.
 	     */
-	    error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_proc);
+	    error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_thread);
 	    if (error)
 		return (error);
 
@@ -331,7 +330,7 @@
 	 * regular file, or empty directory.
 	 */
 	if (nameiop == RENAME && wantparent && islastcn) {
-	    error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_proc);
+	    error = VOP_ACCESS(dvp, VWRITE, cred, cnp->cn_thread);
 	    if (error)
 		return (error);
 
--- VOP_RENAME.9.orig	Thu May 29 22:31:59 2003
+++ VOP_RENAME.9	Thu May 29 22:32:28 2003
@@ -170,7 +170,7 @@
      * the user must have write permission in the source so
      * as to be able to change "..".
      */
-    error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc);
+    error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread);
     VOP_UNLOCK(fvp);
     if (doingdirectory && fdvp != tdvp) {
 	/*


More information about the freebsd-doc mailing list