1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00: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:
Konstantin Belousov 2008-05-23 16:36:39 +00:00
parent 8837b0dd09
commit 772e245341
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179247

View File

@ -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);