summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-01-18 18:43:38 +0000
committerjhb <jhb@FreeBSD.org>2013-01-18 18:43:38 +0000
commit812f7427ff704698be35b66b5ddb9182d7d6d22e (patch)
tree175077f108ffeadc6414dccb1f19dad26b197ecf /sys/nfsclient
parenta757b0e056a396f4f674631a6e5eea6d29ed1087 (diff)
downloadFreeBSD-src-812f7427ff704698be35b66b5ddb9182d7d6d22e.zip
FreeBSD-src-812f7427ff704698be35b66b5ddb9182d7d6d22e.tar.gz
Use vfs_timestamp() to set file timestamps rather than invoking
getmicrotime() or getnanotime() directly in NFS. Reviewed by: rmacklem, bde MFC after: 1 week
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index ca9edad..5026daf 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -3458,7 +3458,7 @@ nfsfifo_read(struct vop_read_args *ap)
*/
mtx_lock(&np->n_mtx);
np->n_flag |= NACC;
- getnanotime(&np->n_atim);
+ vfs_timestamp(&np->n_atim);
mtx_unlock(&np->n_mtx);
error = fifo_specops.vop_read(ap);
return error;
@@ -3477,7 +3477,7 @@ nfsfifo_write(struct vop_write_args *ap)
*/
mtx_lock(&np->n_mtx);
np->n_flag |= NUPD;
- getnanotime(&np->n_mtim);
+ vfs_timestamp(&np->n_mtim);
mtx_unlock(&np->n_mtx);
return(fifo_specops.vop_write(ap));
}
@@ -3497,7 +3497,7 @@ nfsfifo_close(struct vop_close_args *ap)
mtx_lock(&np->n_mtx);
if (np->n_flag & (NACC | NUPD)) {
- getnanotime(&ts);
+ vfs_timestamp(&ts);
if (np->n_flag & NACC)
np->n_atim = ts;
if (np->n_flag & NUPD)
OpenPOWER on IntegriCloud