From 77b7040ca5cc0c7fc5e73496c666dddd8ea15542 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Wed, 13 Jul 1994 19:07:48 +0000 Subject: entered into RCS --- libdiskfs/io-read.c | 3 ++- libdiskfs/io-write.c | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'libdiskfs') 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); -- cgit v1.2.3