From a280492f6ec061055ad6379cd9dec52f8b3fa615 Mon Sep 17 00:00:00 2001 From: kib Date: Tue, 1 Jan 2013 16:14:48 +0000 Subject: The process_deferred_inactive() function locks the vnodes of the ufs mount, which means that is must not be called while the snaplock is owned. The vfs_write_resume(9) does call the function as the VFS_SUSP_CLEAN() method, which is too early and falls into the region still protected by snaplock. Add yet another flag for the vfs_write_resume_flags() to avoid calling suspension cleanup handler after the suspend is lifted, and use it in the ffs_snapshot() call to vfs_write_resume. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks --- sys/ufs/ffs/ffs_snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/ufs') diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 25ad79c..5f67ae5 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -687,7 +687,7 @@ out1: /* * Resume operation on filesystem. */ - vfs_write_resume_flags(vp->v_mount, VR_START_WRITE); + vfs_write_resume_flags(vp->v_mount, VR_START_WRITE | VR_NO_SUSPCLR); if (collectsnapstats && starttime.tv_sec > 0) { nanotime(&endtime); timespecsub(&endtime, &starttime); -- cgit v1.1