FreeBSD/sys/kern/vfs_vnops.c
/*
 * Request a filesystem to resume write operations.
 */
Request a filesystem to resume write operations.
Request a filesystem to resume write operations .
void
vfs_write_resume(struct mount *mp, int flags)
{
	MPASS(vn_suspendable(mp));
	MNT_ILOCK(mp);
	if ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) {
		KASSERT(mp->mnt_susp_owner == curthread, ("mnt_susp_owner"));
		mp->mnt_kern_flag &= ~(MNTK_SUSPEND | MNTK_SUSPEND2 |
				       MNTK_SUSPENDED);
		mp->mnt_susp_owner = NULL;
		wakeup(&mp->mnt_writeopcount);
		wakeup(&mp->mnt_flag);
		curthread->td_pflags &= ~TDP_IGNSUSP;
		if ((flags & VR_START_WRITE) != 0) {
			MNT_REF(mp);
			mp->mnt_writeopcount++;
		}
		MNT_IUNLOCK(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);
	} else {
		MNT_IUNLOCK(mp);
	}
}
void vfs_write_resume ( struct mount * mp , int flags ) { MPASS ( vn_suspendable ( mp ) ) ; MNT_ILOCK ( mp ) ; if ( ( mp -> mnt_kern_flag & MNTK_SUSPEND ) != 0 ) { KASSERT ( mp -> mnt_susp_owner == curthread , ( " " ) ) ; mp -> mnt_kern_flag &= ~ ( MNTK_SUSPEND | MNTK_SUSPEND2 | MNTK_SUSPENDED ) ; mp -> mnt_susp_owner = NULL ; wakeup ( & mp -> mnt_writeopcount ) ; wakeup ( & mp -> mnt_flag ) ; curthread -> td_pflags &= ~ TDP_IGNSUSP ; if ( ( flags & VR_START_WRITE ) != 0 ) { MNT_REF ( mp ) ; mp -> mnt_writeopcount ++ ; } MNT_IUNLOCK ( 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 ) ; } else { MNT_IUNLOCK ( mp ) ; } }
Request a filesystem to resume write operations.
Request a filesystem to resume write operations .