version 1.19.2.1, 2012/10/30 17:22:22 |
version 1.19.2.2, 2013/01/16 05:33:38 |
Line 151 cd9660_lookup(void *v) |
|
Line 151 cd9660_lookup(void *v) |
|
* check the name cache to see if the directory/name pair |
* check the name cache to see if the directory/name pair |
* we are looking for is known already. |
* we are looking for is known already. |
*/ |
*/ |
if ((error = cache_lookup(vdp, vpp, cnp)) >= 0) |
if (cache_lookup(vdp, cnp->cn_nameptr, cnp->cn_namelen, |
return (error); |
cnp->cn_nameiop, cnp->cn_flags, NULL, vpp)) { |
|
return *vpp == NULLVP ? ENOENT : 0; |
|
} |
|
|
len = cnp->cn_namelen; |
len = cnp->cn_namelen; |
name = cnp->cn_nameptr; |
name = cnp->cn_nameptr; |
|
|
/* |
/* |
* Insert name into cache (as non-existent) if appropriate. |
* Insert name into cache (as non-existent) if appropriate. |
*/ |
*/ |
cache_enter(vdp, *vpp, cnp); |
cache_enter(vdp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_flags); |
return (nameiop == CREATE || nameiop == RENAME) ? EROFS : ENOENT; |
return (nameiop == CREATE || nameiop == RENAME) ? EROFS : ENOENT; |
|
|
found: |
found: |
|
|
/* |
/* |
* Insert name into cache if appropriate. |
* Insert name into cache if appropriate. |
*/ |
*/ |
cache_enter(vdp, *vpp, cnp); |
cache_enter(vdp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_flags); |
return 0; |
return 0; |
} |
} |
|
|