summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nfs')
-rw-r--r--sys/fs/nfs/nfsport.h8
-rw-r--r--sys/fs/nfs/nfsrvstate.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index eea9df0..1e0c0ba 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -787,12 +787,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/nfs/nfsrvstate.h b/sys/fs/nfs/nfsrvstate.h
index 6d32244..42254ab 100644
--- a/sys/fs/nfs/nfsrvstate.h
+++ b/sys/fs/nfs/nfsrvstate.h
@@ -113,7 +113,7 @@ struct nfsclient {
* Structure for an NFSv4.1 session.
* Locking rules for this structure.
* To add/delete one of these structures from the lists, you must lock
- * both: NFSLOCKSESSION(session hashhead) and NFSLOCKSTATE() in that order.
+ * both: NFSLOCKSTATE() and NFSLOCKSESSION(session hashhead) in that order.
* To traverse the lists looking for one of these, you must hold one
* of these two locks.
* The exception is if the thread holds the exclusive root sleep lock.
OpenPOWER on IntegriCloud