* Request a filesystem to resume write operations. */
| 2042 | * Request a filesystem to resume write operations. |
| 2043 | */ |
| 2044 | void |
| 2045 | vfs_write_resume(struct mount *mp, int flags) |
| 2046 | { |
| 2047 | |
| 2048 | MNT_ILOCK(mp); |
| 2049 | if ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) { |
| 2050 | KASSERT(mp->mnt_susp_owner == curthread, ("mnt_susp_owner")); |
| 2051 | mp->mnt_kern_flag &= ~(MNTK_SUSPEND | MNTK_SUSPEND2 | |
| 2052 | MNTK_SUSPENDED); |
| 2053 | mp->mnt_susp_owner = NULL; |
| 2054 | wakeup(&mp->mnt_writeopcount); |
| 2055 | wakeup(&mp->mnt_flag); |
| 2056 | curthread->td_pflags &= ~TDP_IGNSUSP; |
| 2057 | if ((flags & VR_START_WRITE) != 0) { |
| 2058 | MNT_REF(mp); |
| 2059 | mp->mnt_writeopcount++; |
| 2060 | } |
| 2061 | MNT_IUNLOCK(mp); |
| 2062 | if ((flags & VR_NO_SUSPCLR) == 0) |
| 2063 | VFS_SUSP_CLEAN(mp); |
| 2064 | vfs_op_exit(mp); |
| 2065 | } else if ((flags & VR_START_WRITE) != 0) { |
| 2066 | MNT_REF(mp); |
| 2067 | vn_start_write_refed(mp, 0, true); |
| 2068 | } else { |
| 2069 | MNT_IUNLOCK(mp); |
| 2070 | } |
| 2071 | } |
| 2072 | |
| 2073 | /* |
| 2074 | * Helper loop around vfs_write_suspend() for filesystem unmount VFS |
no test coverage detected