diff options
author | kib <kib@FreeBSD.org> | 2013-01-01 16:14:48 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-01-01 16:14:48 +0000 |
commit | a280492f6ec061055ad6379cd9dec52f8b3fa615 (patch) | |
tree | 8e7985b61d58092788052ca1c50248ebd93236e5 /sys/kern/vfs_vnops.c | |
parent | 2fad9bb720db4816b922d45d6f123dd6fd00cd1a (diff) | |
download | FreeBSD-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/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index cf49ecb..bbe837a 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1667,7 +1667,8 @@ vfs_write_resume_flags(struct mount *mp, int flags) mp->mnt_writeopcount++; } MNT_IUNLOCK(mp); - VFS_SUSP_CLEAN(mp); + if ((flags & VR_NO_SUSPCLR) == 0) + VFS_SUSP_CLEAN(mp); } else if ((flags & VR_START_WRITE) != 0) { MNT_REF(mp); vn_start_write_locked(mp, 0); |