diff options
author | Miles Bader <miles@gnu.org> | 1996-07-28 01:44:46 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-28 01:44:46 +0000 |
commit | eea8535c93e1c7ab875f17ee5c93ce7f290db2ee (patch) | |
tree | 2a0a305fb78a085208e6e777ffd3f490b070c905 /libdiskfs | |
parent | 95d7001a708f2956ae6598d3cb3ad3ac74227a02 (diff) |
(periodic_sync): Don't sync if DISKFS_READONLY.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/sync-interval.c | 11 |
1 files changed, 7 insertions, 4 deletions
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); } |