mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
FBSD: avoid vrefl()
Commit 20dc2832268eb (correctly) introduced changes so that we avoid interacting with vnodes marked as VI_DOOMED to the extent possible, but in doing so inadvertendly used the vrefl() KPI that was only introduced in FreeBSD 11.0. Rewrite the relevant logic to use the older vref() KPI, at the cost of a few more unlock/locks, in order to have a single codepath that works on all supported FreeBSD versions. Change-Id: Ib315d59ea6c6208bbd0c908d8eaf502a4de51869 Reviewed-on: https://gerrit.openafs.org/14373 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
0066f4e9f2
commit
81ea654494
@ -131,13 +131,14 @@ osi_vnhold(struct vcache *avc)
|
|||||||
{
|
{
|
||||||
struct vnode *vp = AFSTOV(avc);
|
struct vnode *vp = AFSTOV(avc);
|
||||||
|
|
||||||
|
vref(vp);
|
||||||
VI_LOCK(vp);
|
VI_LOCK(vp);
|
||||||
if ((vp->v_iflag & VI_DOOMED) != 0) {
|
if ((vp->v_iflag & VI_DOOMED) != 0) {
|
||||||
VI_UNLOCK(vp);
|
VI_UNLOCK(vp);
|
||||||
|
vrele(vp);
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
vrefl(AFSTOV(avc));
|
|
||||||
VI_UNLOCK(vp);
|
VI_UNLOCK(vp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user