summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-28 01:43:27 +0000
committerMiles Bader <miles@gnu.org>1996-07-28 01:43:27 +0000
commite8e7a60b4ea977f8654f54a96dffd91bf32e384f (patch)
tree584ab0df4924d638db928fc7f818f43102e3beda
parent8f83654b4fa8089402f27706f0727a65e021927a (diff)
(diskfs_S_file_syncfs): Don't sync if DISKFS_READONLY.
-rw-r--r--libdiskfs/file-syncfs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libdiskfs/file-syncfs.c b/libdiskfs/file-syncfs.c
index 94895978..a3b7622e 100644
--- a/libdiskfs/file-syncfs.c
+++ b/libdiskfs/file-syncfs.c
@@ -1,5 +1,5 @@
/* libdiskfs implementation of fs.defs: file_syncfs
- Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation
+ Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -51,7 +51,11 @@ diskfs_S_file_syncfs (struct protid *cred,
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);
+ }
+
return 0;
}