Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clvnops.c
Show First 20 Lines • Show All 1,229 Lines • ▼ Show 20 Lines | if (error == -1) { | ||||
} | } | ||||
cache_purge(newvp); | cache_purge(newvp); | ||||
if (dvp != newvp) | if (dvp != newvp) | ||||
vput(newvp); | vput(newvp); | ||||
else | else | ||||
vrele(newvp); | vrele(newvp); | ||||
*vpp = NULLVP; | *vpp = NULLVP; | ||||
} else if (error == ENOENT) { | } else if (error == ENOENT) { | ||||
if (dvp->v_iflag & VI_DOOMED) | if (VN_IS_DOOMED(dvp)) | ||||
return (ENOENT); | return (ENOENT); | ||||
/* | /* | ||||
* We only accept a negative hit in the cache if the | * We only accept a negative hit in the cache if the | ||||
* modification time of the parent directory matches | * modification time of the parent directory matches | ||||
* the cached copy in the name cache entry. | * the cached copy in the name cache entry. | ||||
* Otherwise, we discard all of the negative cache | * Otherwise, we discard all of the negative cache | ||||
* entries for this directory. We also only trust | * entries for this directory. We also only trust | ||||
* negative cache entries for up to nm_negnametimeo | * negative cache entries for up to nm_negnametimeo | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | if (flags & ISDOTDOT) { | ||||
ltype = NFSVOPISLOCKED(dvp); | ltype = NFSVOPISLOCKED(dvp); | ||||
error = vfs_busy(mp, MBF_NOWAIT); | error = vfs_busy(mp, MBF_NOWAIT); | ||||
if (error != 0) { | if (error != 0) { | ||||
vfs_ref(mp); | vfs_ref(mp); | ||||
NFSVOPUNLOCK(dvp, 0); | NFSVOPUNLOCK(dvp, 0); | ||||
error = vfs_busy(mp, 0); | error = vfs_busy(mp, 0); | ||||
NFSVOPLOCK(dvp, ltype | LK_RETRY); | NFSVOPLOCK(dvp, ltype | LK_RETRY); | ||||
vfs_rel(mp); | vfs_rel(mp); | ||||
if (error == 0 && (dvp->v_iflag & VI_DOOMED)) { | if (error == 0 && VN_IS_DOOMED(dvp)) { | ||||
vfs_unbusy(mp); | vfs_unbusy(mp); | ||||
error = ENOENT; | error = ENOENT; | ||||
} | } | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
} | } | ||||
NFSVOPUNLOCK(dvp, 0); | NFSVOPUNLOCK(dvp, 0); | ||||
error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL, | error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL, | ||||
cnp->cn_lkflags); | cnp->cn_lkflags); | ||||
if (error == 0) | if (error == 0) | ||||
newvp = NFSTOV(np); | newvp = NFSTOV(np); | ||||
vfs_unbusy(mp); | vfs_unbusy(mp); | ||||
if (newvp != dvp) | if (newvp != dvp) | ||||
NFSVOPLOCK(dvp, ltype | LK_RETRY); | NFSVOPLOCK(dvp, ltype | LK_RETRY); | ||||
if (dvp->v_iflag & VI_DOOMED) { | if (VN_IS_DOOMED(dvp)) { | ||||
if (error == 0) { | if (error == 0) { | ||||
if (newvp == dvp) | if (newvp == dvp) | ||||
vrele(newvp); | vrele(newvp); | ||||
else | else | ||||
vput(newvp); | vput(newvp); | ||||
} | } | ||||
error = ENOENT; | error = ENOENT; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,256 Lines • Show Last 20 Lines |