summaryrefslogtreecommitdiff
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2013-01-18 18:43:38 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2013-01-18 18:43:38 +0000
commitd177f14da93f17d7b4c949b9e142a42261328dfe (patch)
tree175077f108ffeadc6414dccb1f19dad26b197ecf /sys/nfsclient
parent1c67ef129f313bc2a1029ca054180a0c3607ae90 (diff)
downloadsrc-test2-d177f14da93f17d7b4c949b9e142a42261328dfe.tar.gz
src-test2-d177f14da93f17d7b4c949b9e142a42261328dfe.zip
Use vfs_timestamp() to set file timestamps rather than invoking
getmicrotime() or getnanotime() directly in NFS. Reviewed by: rmacklem, bde MFC after: 1 week
Notes
Notes: svn path=/head/; revision=245611
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 ca9edad5f355..5026daf8e8a9 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)