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

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