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

reversal.
This commit is contained in:
Alan Cox 2003-11-13 03:56:32 +00:00
parent e46fe241d3
commit c78b8dfacf

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);