procfs - Use newly introduced textnch
authorAlex Hornung <ahornung@gmail.com>
Fri, 12 Mar 2010 23:07:27 +0000 (23:07 +0000)
committerAlex Hornung <ahornung@gmail.com>
Sat, 13 Mar 2010 08:22:26 +0000 (08:22 +0000)
* Use the newly introduced p_textnch instead of p_textvp to find the
  path to the .text file for each proc entry in /proc.

sys/vfs/procfs/procfs_vnops.c

index 87de884..ad8eb3a 100644 (file)
@@ -579,7 +579,7 @@ procfs_getattr(struct vop_getattr_args *ap)
 
        case Pfile: {
                char *fullpath, *freepath;
-               error = vn_fullpath(procp, NULL, &fullpath, &freepath);
+               error = cache_fullpath(procp, &procp->p_textnch, &fullpath, &freepath);
                if (error == 0) {
                        vap->va_size = strlen(fullpath);
                        kfree(freepath, M_TEMP);
@@ -1040,7 +1040,7 @@ procfs_readlink(struct vop_readlink_args *ap)
                        return (uiomove("unknown", sizeof("unknown") - 1,
                            ap->a_uio));
                }
-               error = vn_fullpath(procp, NULL, &fullpath, &freepath);
+               error = cache_fullpath(procp, &procp->p_textnch, &fullpath, &freepath);
                if (error != 0)
                        return (uiomove("unknown", sizeof("unknown") - 1,
                            ap->a_uio));