aboutsummaryrefslogtreecommitdiff
path: root/sys/msdosfs/msdosfs_denode.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-04-11 17:13:17 +0000
committerBruce Evans <bde@FreeBSD.org>1995-04-11 17:13:17 +0000
commit2360b9bfc7554c6b6aa937b65eb0815ac5cf394d (patch)
tree7297af1ebdf332c9ad670b7e71dede2ad4e7c5d7 /sys/msdosfs/msdosfs_denode.c
parent82f196916e0cdee5884e6e602eddaf7036f0b650 (diff)
downloadsrc-2360b9bfc7554c6b6aa937b65eb0815ac5cf394d.tar.gz
src-2360b9bfc7554c6b6aa937b65eb0815ac5cf394d.zip
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."
Notes
Notes: svn path=/head/; revision=7755
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 17d163c0ada9..c0e882394538 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);
/*