Fix the lookup in the DOTDOT case in the same way as other filesystems do,
i.e. inlining the vn_vget_ino() algorithm. Sponsored by: iXsystems inc.
This commit is contained in:
parent
40455cf3af
commit
9dbe0b121c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243033
@ -1278,9 +1278,30 @@ smbfs_lookup(ap)
|
||||
goto out;
|
||||
}
|
||||
if (flags & ISDOTDOT) {
|
||||
mp = dvp->v_mount;
|
||||
error = vfs_busy(mp, MBF_NOWAIT);
|
||||
if (error != 0) {
|
||||
vfs_ref(mp);
|
||||
VOP_UNLOCK(dvp, 0);
|
||||
error = vfs_busy(mp, 0);
|
||||
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
vfs_rel(mp);
|
||||
if (error)
|
||||
return (ENOENT);
|
||||
if ((dvp->v_iflag & VI_DOOMED) != 0) {
|
||||
vfs_unbusy(mp);
|
||||
return (ENOENT);
|
||||
}
|
||||
}
|
||||
VOP_UNLOCK(dvp, 0);
|
||||
error = smbfs_nget(mp, dvp, name, nmlen, NULL, &vp);
|
||||
vfs_unbusy(mp);
|
||||
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
if ((dvp->v_iflag & VI_DOOMED) != 0) {
|
||||
if (error == 0)
|
||||
vput(vp);
|
||||
error = ENOENT;
|
||||
}
|
||||
if (error)
|
||||
goto out;
|
||||
*vpp = vp;
|
||||
|
Loading…
Reference in New Issue
Block a user