Call free(9) after the vnode interlock is released, avoiding a lock-order

reversal.
This commit is contained in:
alc 2003-11-13 03:56:32 +00:00
parent 02ce70bc82
commit 50bd3c6a8f

View File

@ -652,9 +652,9 @@ ffs_snapshot(mp, snapfile)
space = devvp->v_rdev->si_snapblklist;
devvp->v_rdev->si_snapblklist = snapblklist;
devvp->v_rdev->si_snaplistsize = snaplistsize;
VI_UNLOCK(devvp);
if (space != NULL)
FREE(space, M_UFSMNT);
VI_UNLOCK(devvp);
done:
free(copy_fs->fs_csp, M_UFSMNT);
bawrite(sbp);