Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_syscalls.c
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { | ||||
if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK)) { | if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK)) { | ||||
nmp = TAILQ_NEXT(mp, mnt_list); | nmp = TAILQ_NEXT(mp, mnt_list); | ||||
continue; | continue; | ||||
} | } | ||||
if ((mp->mnt_flag & MNT_RDONLY) == 0 && | if ((mp->mnt_flag & MNT_RDONLY) == 0 && | ||||
vn_start_write(NULL, &mp, V_NOWAIT) == 0) { | vn_start_write(NULL, &mp, V_NOWAIT) == 0) { | ||||
save = curthread_pflags_set(TDP_SYNCIO); | save = curthread_pflags_set(TDP_SYNCIO); | ||||
vfs_periodic(mp, MNT_NOWAIT); | vfs_periodic(mp, MNT_NOWAIT); | ||||
VFS_SYNC(mp, MNT_NOWAIT); | VFS_SYNC(mp, MNT_WAIT); | ||||
curthread_pflags_restore(save); | curthread_pflags_restore(save); | ||||
vn_finished_write(mp); | vn_finished_write(mp); | ||||
} | } | ||||
mtx_lock(&mountlist_mtx); | mtx_lock(&mountlist_mtx); | ||||
nmp = TAILQ_NEXT(mp, mnt_list); | nmp = TAILQ_NEXT(mp, mnt_list); | ||||
vfs_unbusy(mp); | vfs_unbusy(mp); | ||||
} | } | ||||
mtx_unlock(&mountlist_mtx); | mtx_unlock(&mountlist_mtx); | ||||
▲ Show 20 Lines • Show All 4,710 Lines • Show Last 20 Lines |