Date: Wed, 14 Nov 2012 18:43:58 +0000 (UTC) From: Davide Italiano <davide@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243033 - head/sys/fs/smbfs Message-ID: <201211141843.qAEIhwI9028378@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davide Date: Wed Nov 14 18:43:58 2012 New Revision: 243033 URL: http://svnweb.freebsd.org/changeset/base/243033 Log: 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. Modified: head/sys/fs/smbfs/smbfs_vnops.c Modified: head/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 17:44:37 2012 (r243032) +++ head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 18:43:58 2012 (r243033) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211141843.qAEIhwI9028378>