mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
When vget() fails (because the vnode has been reclaimed), there is no
sense to loop trying to vget() the vnode again. PR: 122977 Submitted by: Arthur Hartwig <arthur.hartwig nokia com> Tested by: pho Reviewed by: jhb MFC after: 1 week
This commit is contained in:
parent
8837b0dd09
commit
772e245341
1 changed files with 4 additions and 3 deletions
|
|
@ -280,7 +280,6 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, stru
|
|||
sx_xunlock(&dmp->dm_lock);
|
||||
return (ENOENT);
|
||||
}
|
||||
loop:
|
||||
DEVFS_DE_HOLD(de);
|
||||
DEVFS_DMP_HOLD(dmp);
|
||||
mtx_lock(&devfs_de_interlock);
|
||||
|
|
@ -296,8 +295,10 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, stru
|
|||
vput(vp);
|
||||
return (ENOENT);
|
||||
}
|
||||
else if (error)
|
||||
goto loop;
|
||||
else if (error) {
|
||||
sx_xunlock(&dmp->dm_lock);
|
||||
return (error);
|
||||
}
|
||||
sx_xunlock(&dmp->dm_lock);
|
||||
*vpp = vp;
|
||||
return (0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue