aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1999-07-25 02:56:17 +0000
committerBruce Evans <bde@FreeBSD.org>1999-07-25 02:56:17 +0000
commit2ac6e746550841e7f6a297bf85e7546b95b43e65 (patch)
treeef96f9d3a9f02b2fd1329ad94b22a3640e1b9010 /sys/gnu
parent3dfdfdb27fc843d12d5b77b05aa5a018f5ce727b (diff)
Notes
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_readwrite.c6
-rw-r--r--sys/gnu/fs/ext2fs/ext2_readwrite.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c
index d5881e2e6f49d..abcdfe366e326 100644
--- a/sys/gnu/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/ext2fs/ext2_readwrite.c
@@ -68,7 +68,7 @@ READ(ap)
daddr_t lbn, nextlbn;
off_t bytesinfile;
long size, xfersize, blkoffset;
- int error;
+ int error, orig_resid;
u_short mode;
vp = ap->a_vp;
@@ -92,6 +92,7 @@ READ(ap)
return (EFBIG);
#endif
+ orig_resid = uio->uio_resid;
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0)
break;
@@ -147,7 +148,8 @@ READ(ap)
}
if (bp != NULL)
bqrelse(bp);
- if (!(vp->v_mount->mnt_flag & MNT_NOATIME))
+ if (orig_resid > 0 && (error == 0 || uio->uio_resid != orig_resid) &&
+ (vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
ip->i_flag |= IN_ACCESS;
return (error);
}
diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c
index d5881e2e6f49d..abcdfe366e326 100644
--- a/sys/gnu/fs/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/fs/ext2fs/ext2_readwrite.c
@@ -68,7 +68,7 @@ READ(ap)
daddr_t lbn, nextlbn;
off_t bytesinfile;
long size, xfersize, blkoffset;
- int error;
+ int error, orig_resid;
u_short mode;
vp = ap->a_vp;
@@ -92,6 +92,7 @@ READ(ap)
return (EFBIG);
#endif
+ orig_resid = uio->uio_resid;
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0)
break;
@@ -147,7 +148,8 @@ READ(ap)
}
if (bp != NULL)
bqrelse(bp);
- if (!(vp->v_mount->mnt_flag & MNT_NOATIME))
+ if (orig_resid > 0 && (error == 0 || uio->uio_resid != orig_resid) &&
+ (vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
ip->i_flag |= IN_ACCESS;
return (error);
}