Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_stats.c
Show First 20 Lines • Show All 660 Lines • ▼ Show 20 Lines | linux_syncfs(struct thread *td, struct linux_syncfs_args *args) | ||||
if (error != 0) { | if (error != 0) { | ||||
/* See comment above. */ | /* See comment above. */ | ||||
mtx_unlock(&mountlist_mtx); | mtx_unlock(&mountlist_mtx); | ||||
goto out; | goto out; | ||||
} | } | ||||
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_msync(mp, MNT_NOWAIT); | vfs_periodic(mp, MNT_NOWAIT); | ||||
VFS_SYNC(mp, MNT_NOWAIT); | VFS_SYNC(mp, MNT_NOWAIT); | ||||
curthread_pflags_restore(save); | curthread_pflags_restore(save); | ||||
vn_finished_write(mp); | vn_finished_write(mp); | ||||
} | } | ||||
vfs_unbusy(mp); | vfs_unbusy(mp); | ||||
out: | out: | ||||
vrele(vp); | vrele(vp); | ||||
return (error); | return (error); | ||||
} | } |