mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
darwin-remunlink-20070320
FIXES 55280 make reumlink work the way it's supposed to
This commit is contained in:
parent
ff81d7e77a
commit
c2fb9440f3
@ -1194,8 +1194,12 @@ afs_vop_remove(ap)
|
|||||||
cache_purge(vp);
|
cache_purge(vp);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
#ifdef AFS_DARWIN80_ENV
|
#ifdef AFS_DARWIN80_ENV
|
||||||
ubc_setsize(vp, (off_t)0);
|
struct vcache *tvc = VTOAFS(vp);
|
||||||
vnode_recycle(vp);
|
|
||||||
|
if (!(tvc->states & CUnlinked)) {
|
||||||
|
ubc_setsize(vp, (off_t)0);
|
||||||
|
vnode_recycle(vp);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
/* necessary so we don't deadlock ourselves in vclean */
|
/* necessary so we don't deadlock ourselves in vclean */
|
||||||
VOP_UNLOCK(vp, 0, cnp->cn_proc);
|
VOP_UNLOCK(vp, 0, cnp->cn_proc);
|
||||||
@ -1626,9 +1630,18 @@ afs_vop_inactive(ap)
|
|||||||
vprint("afs_vop_inactive(): pushing active", vp);
|
vprint("afs_vop_inactive(): pushing active", vp);
|
||||||
#endif
|
#endif
|
||||||
if (tvc) {
|
if (tvc) {
|
||||||
AFS_GLOCK();
|
#ifdef AFS_DARWIN80_ENV
|
||||||
afs_InactiveVCache(tvc, 0); /* decrs ref counts */
|
int unlinked = tvc->states & CUnlinked;
|
||||||
AFS_GUNLOCK();
|
#endif
|
||||||
|
AFS_GLOCK();
|
||||||
|
afs_InactiveVCache(tvc, 0); /* decrs ref counts */
|
||||||
|
AFS_GUNLOCK();
|
||||||
|
#ifdef AFS_DARWIN80_ENV
|
||||||
|
if (unlinked) {
|
||||||
|
vnode_recycle(vp);
|
||||||
|
cache_purge(vp);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#ifndef AFS_DARWIN80_ENV
|
#ifndef AFS_DARWIN80_ENV
|
||||||
VOP_UNLOCK(vp, 0, ap->a_p);
|
VOP_UNLOCK(vp, 0, ap->a_p);
|
||||||
|
Loading…
Reference in New Issue
Block a user