Author: kevlo
Date: Mon Oct 18 03:34:33 2010
New Revision: 214001
URL: http://svn.freebsd.org/changeset/base/214001
Log:
Fix a possible race where the directory dirent is moved to the location
that was used by ".." entry.
This change seems fixed panic during attempt to access msdosfs data
over nfs.
Reviewed by: kib
MFC after: 1 week
Modified:
head/sys/fs/msdosfs/msdosfs_lookup.c
Modified: head/sys/fs/msdosfs/msdosfs_lookup.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_lookup.c Sun Oct 17 23:15:36 2010
(r214000)
+++ head/sys/fs/msdosfs/msdosfs_lookup.c Mon Oct 18 03:34:33 2010
(r214001)
@@ -594,10 +594,15 @@ msdosfs_deget_dotdot(struct vnode *vp, u
vfs_unbusy(mp);
if (error == 0)
*rvp = DETOV(rdp);
- vn_lock(vp, ltype | LK_RETRY);
+ if (*rvp != vp)
+ vn_lock(vp, ltype | LK_RETRY);
if (vp->v_iflag & VI_DOOMED) {
- if (error == 0)
- vput(*rvp);
+ if (error == 0) {
+ if (*rvp == vp)
+ vunref(*rvp);
+ else
+ vput(*rvp);
+ }
error = ENOENT;
}
return (error);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"