From eea8535c93e1c7ab875f17ee5c93ce7f290db2ee Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 28 Jul 1996 01:44:46 +0000 Subject: (periodic_sync): Don't sync if DISKFS_READONLY. --- libdiskfs/sync-interval.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libdiskfs') diff --git a/libdiskfs/sync-interval.c b/libdiskfs/sync-interval.c index c2b578a8..acdb0842 100644 --- a/libdiskfs/sync-interval.c +++ b/libdiskfs/sync-interval.c @@ -109,10 +109,13 @@ periodic_sync (int interval) if (! err) { - rwlock_reader_lock (&diskfs_fsys_lock); - diskfs_sync_everything (0); - diskfs_set_hypermetadata (0, 0); - rwlock_reader_unlock (&diskfs_fsys_lock); + if (! diskfs_readonly) + { + 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); } -- cgit v1.2.3