diff options
| author | Rick Macklem <rmacklem@FreeBSD.org> | 2016-04-11 21:55:21 +0000 |
|---|---|---|
| committer | Rick Macklem <rmacklem@FreeBSD.org> | 2016-04-11 21:55:21 +0000 |
| commit | 84aa8a8ad100a103404402dcad21120ad48ca2e9 (patch) | |
| tree | 2f6a4476cf50b52b69627b485731f0efb4a1ac7d /sys/fs | |
| parent | 306c3c4d9084ba42d118b6187e66074e0d12b31d (diff) | |
Notes
Diffstat (limited to 'sys/fs')
| -rw-r--r-- | sys/fs/nfs/nfsport.h | 8 | ||||
| -rw-r--r-- | sys/fs/nfsclient/nfs_clrpcops.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index 59e353dadb05..04bb27c54412 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -788,12 +788,14 @@ MALLOC_DECLARE(M_NEWNFSDSESSION); /* * Set the n_time in the client write rpc, as required. */ -#define NFSWRITERPC_SETTIME(w, n, v4) \ +#define NFSWRITERPC_SETTIME(w, n, a, v4) \ do { \ if (w) { \ - (n)->n_mtime = (n)->n_vattr.na_vattr.va_mtime; \ + mtx_lock(&((n)->n_mtx)); \ + (n)->n_mtime = (a)->na_mtime; \ if (v4) \ - (n)->n_change = (n)->n_vattr.na_vattr.va_filerev; \ + (n)->n_change = (a)->na_filerev; \ + mtx_unlock(&((n)->n_mtx)); \ } \ } while (0) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index cd12fba7c2d4..6e6ece3da346 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -1734,7 +1734,7 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, } if (error) goto nfsmout; - NFSWRITERPC_SETTIME(wccflag, np, (nd->nd_flag & ND_NFSV4)); + NFSWRITERPC_SETTIME(wccflag, np, nap, (nd->nd_flag & ND_NFSV4)); mbuf_freem(nd->nd_mrep); nd->nd_mrep = NULL; tsiz -= len; |
