summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-01-01 16:14:48 +0000
committerkib <kib@FreeBSD.org>2013-01-01 16:14:48 +0000
commita280492f6ec061055ad6379cd9dec52f8b3fa615 (patch)
tree8e7985b61d58092788052ca1c50248ebd93236e5 /sys/ufs
parent2fad9bb720db4816b922d45d6f123dd6fd00cd1a (diff)
downloadFreeBSD-src-a280492f6ec061055ad6379cd9dec52f8b3fa615.zip
FreeBSD-src-a280492f6ec061055ad6379cd9dec52f8b3fa615.tar.gz
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
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c2
1 files changed, 1 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud