diff options
-rw-r--r-- | libdiskfs/fsys-syncfs.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libdiskfs/fsys-syncfs.c b/libdiskfs/fsys-syncfs.c index 2d51a872..2283e03e 100644 --- a/libdiskfs/fsys-syncfs.c +++ b/libdiskfs/fsys-syncfs.c @@ -29,12 +29,25 @@ diskfs_S_fsys_syncfs (fsys_t controlport, { struct port_info *pi = ports_lookup_port (diskfs_port_bucket, controlport, diskfs_control_class); + error_t + helper (struct node *np) + { + error_t error; + + error = fshelp_fetch_control (np, &control); + if (!error && control != MACH_PORT_NULL) + { + fsys_syncfs (control, wait, 1); + mach_port_deallocate (mach_task_self (), control); + } + return 0; + } if (!pi) return EOPNOTSUPP; if (children) - diskfs_sync_translators (wait); + diskfs_node_iterate (helper); if (diskfs_synchronous) wait = 1; |