aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs/ffs/ffs_softdep.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2000-09-07 23:02:55 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2000-09-07 23:02:55 +0000
commit52a3bfa2e7b420e325ad810ec77328959d1ad17b (patch)
tree52d5ef0a7fd7aad41098ba750c9678461eb91d1d /sys/ufs/ffs/ffs_softdep.c
parent0deb7ddcd432b5dac48476357c23d0c3ec19c3d6 (diff)
downloadsrc-52a3bfa2e7b420e325ad810ec77328959d1ad17b.tar.gz
src-52a3bfa2e7b420e325ad810ec77328959d1ad17b.zip
Cannot do MALLOC with M_WAITOK while holding ACQUIRE_LOCK
Obtained from: Ethan Solomita <ethan@geocast.com>
Notes
Notes: svn path=/head/; revision=65595
Diffstat (limited to 'sys/ufs/ffs/ffs_softdep.c')
-rw-r--r--sys/ufs/ffs/ffs_softdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index ad30011a8554..1668fa1aae11 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -2837,11 +2837,11 @@ softdep_disk_io_initiation(bp)
/*
* Replace up-to-date version with safe version.
*/
+ MALLOC(indirdep->ir_saveddata, caddr_t, bp->b_bcount,
+ M_INDIRDEP, M_WAITOK);
ACQUIRE_LOCK(&lk);
indirdep->ir_state &= ~ATTACHED;
indirdep->ir_state |= UNDONE;
- MALLOC(indirdep->ir_saveddata, caddr_t, bp->b_bcount,
- M_INDIRDEP, M_WAITOK);
bcopy(bp->b_data, indirdep->ir_saveddata, bp->b_bcount);
bcopy(indirdep->ir_savebp->b_data, bp->b_data,
bp->b_bcount);