summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-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);