summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-07-13 19:07:48 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-07-13 19:07:48 +0000
commit77b7040ca5cc0c7fc5e73496c666dddd8ea15542 (patch)
tree72a71bca17de1b312730916b0defd18e74509d7a
parentc3b3854aa5087182603acd9422805eb71a0f6b79 (diff)
entered into RCS
-rw-r--r--libdiskfs/io-read.c3
-rw-r--r--libdiskfs/io-write.c14
2 files changed, 9 insertions, 8 deletions
diff --git a/libdiskfs/io-read.c b/libdiskfs/io-read.c
index d01e2f8a..59c2b793 100644
--- a/libdiskfs/io-read.c
+++ b/libdiskfs/io-read.c
@@ -63,7 +63,8 @@ diskfs_S_io_read (struct protid *cred,
*datalen = maxread;
if (maxread)
- err = _diskfs_rdwr_internal (np, buf, off, maxread, 0);
+ err = _diskfs_rdwr_internal (np, buf, off, maxread, 0,
+ cred->po->openstat & O_NOATIME);
else
err = 0;
if (offset == -1 && !err)
diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c
index e44b57b5..6092f8df 100644
--- a/libdiskfs/io-write.c
+++ b/libdiskfs/io-write.c
@@ -65,14 +65,14 @@ diskfs_S_io_write (struct protid *cred,
np->dn_set_ctime = 1;
}
- if (!err)
- {
- *amt = datalen;
- err = _diskfs_rdwr_internal (np, data, off, datalen, 1);
+ *amt = datalen;
+ err = _diskfs_rdwr_internal (np, data, off, datalen, 1, 0);
- if (offset == -1)
- cred->po->filepointer += *amt;
- }
+ if (!err && offset == -1)
+ cred->po->filepointer += *amt;
+
+ if (!err && (cred->po->openstat & O_FSYNC))
+ diskfs_file_update (np, 1);
out:
mutex_unlock (&np->lock);