summaryrefslogtreecommitdiff
path: root/libdiskfs/fsys-syncfs.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-28 01:44:01 +0000
committerMiles Bader <miles@gnu.org>1996-07-28 01:44:01 +0000
commit95d7001a708f2956ae6598d3cb3ad3ac74227a02 (patch)
tree4764c1ce5c32efcf1be6698aeef3462e177a406e /libdiskfs/fsys-syncfs.c
parente8e7a60b4ea977f8654f54a96dffd91bf32e384f (diff)
(diskfs_S_fsys_syncfs): Don't sync if DISKFS_READONLY.
Diffstat (limited to 'libdiskfs/fsys-syncfs.c')
-rw-r--r--libdiskfs/fsys-syncfs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libdiskfs/fsys-syncfs.c b/libdiskfs/fsys-syncfs.c
index 81477113..503eea4c 100644
--- a/libdiskfs/fsys-syncfs.c
+++ b/libdiskfs/fsys-syncfs.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -60,8 +60,11 @@ diskfs_S_fsys_syncfs (fsys_t controlport,
if (diskfs_synchronous)
wait = 1;
- diskfs_sync_everything (wait);
- diskfs_set_hypermetadata (wait, 0);
+ if (! diskfs_readonly)
+ {
+ diskfs_sync_everything (wait);
+ diskfs_set_hypermetadata (wait, 0);
+ }
rwlock_reader_unlock (&diskfs_fsys_lock);