summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-10-19 20:21:26 +0000
committerMiles Bader <miles@gnu.org>1995-10-19 20:21:26 +0000
commit71955f28ace790b6349954e0cd3300ba6a4e623a (patch)
treef6a8486380e453bb61291a012a3a79ffb8c2c972 /libdiskfs
parent1f2bdfe2e8595ca34669ab0cd7a464735c9c543b (diff)
(periodic_sync): Hold DISKFS_FSYS_LOCK for reading while syncing.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/sync-interval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdiskfs/sync-interval.c b/libdiskfs/sync-interval.c
index da7fba81..0c51a27b 100644
--- a/libdiskfs/sync-interval.c
+++ b/libdiskfs/sync-interval.c
@@ -97,8 +97,10 @@ periodic_sync (int interval)
return;
}
+ rwlock_reader_lock (&diskfs_fsys_lock);
diskfs_sync_everything (0);
diskfs_set_hypermetadata (0, 0);
+ rwlock_reader_unlock (&diskfs_fsys_lock);
ports_end_rpc (pi, &link);