summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs/msdosfs_denode.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-04-11 17:13:17 +0000
committerbde <bde@FreeBSD.org>1995-04-11 17:13:17 +0000
commit49bffa9247ae5b6afeab9e8875e40d70a6b01cbe (patch)
tree7297af1ebdf332c9ad670b7e71dede2ad4e7c5d7 /sys/msdosfs/msdosfs_denode.c
parent7f98df5944f056ea3b9f0cee97babfa8f8204528 (diff)
downloadFreeBSD-src-49bffa9247ae5b6afeab9e8875e40d70a6b01cbe.zip
FreeBSD-src-49bffa9247ae5b6afeab9e8875e40d70a6b01cbe.tar.gz
Submitted by: Mike Pritchard <pritc003@maroon.tc.umn.edu>
Fix PR 303: msdosfs: moving a file into another directory causes panic. " ... the code that does the rename already has the denode locked when msdosfs_hashins() gets called, resulting in the panic when the routine attempts to lock the denode again. ... The attached patch changes the msdosfs_hashins() routine to not lock the denode. The caller is now resposible for obtaining the lock instead of having msdosfs_hashins() do it for them."
Diffstat (limited to 'sys/msdosfs/msdosfs_denode.c')
-rw-r--r--sys/msdosfs/msdosfs_denode.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index 17d163c..c0e8823 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_denode.c,v 1.9 1995/03/16 18:14:18 bde Exp $ */
+/* $Id: msdosfs_denode.c,v 1.10 1995/03/19 12:11:13 davidg Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
/*-
@@ -119,13 +119,6 @@ msdosfs_hashins(dep)
dep->de_next = deq;
dep->de_prev = depp;
*depp = dep;
- if (dep->de_flag & DE_LOCKED)
- panic("msdosfs_hashins: already locked");
- if (curproc)
- dep->de_lockholder = curproc->p_pid;
- else
- dep->de_lockholder = -1;
- dep->de_flag |= DE_LOCKED;
}
static void
@@ -235,6 +228,7 @@ deget(pmp, dirclust, diroffset, direntptr, depp)
* can't be accessed until we've read it in and have done what we
* need to it.
*/
+ VOP_LOCK(nvp);
msdosfs_hashins(ldep);
/*
OpenPOWER on IntegriCloud