svn commit: r364814 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Wed Aug 26 12:52:55 UTC 2020
Author: mjg
Date: Wed Aug 26 12:52:54 2020
New Revision: 364814
URL: https://svnweb.freebsd.org/changeset/base/364814
Log:
cache: make it mandatory to request both timestamps or neither
Modified:
head/sys/kern/vfs_cache.c
Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c Wed Aug 26 12:52:17 2020 (r364813)
+++ head/sys/kern/vfs_cache.c Wed Aug 26 12:52:54 2020 (r364814)
@@ -415,14 +415,12 @@ cache_out_ts(struct namecache *ncp, struct timespec *t
(tsp == NULL && ticksp == NULL),
("No NCF_TS"));
- if (tsp == NULL && ticksp == NULL)
+ if (tsp == NULL)
return;
ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc);
- if (tsp != NULL)
- *tsp = ncp_ts->nc_time;
- if (ticksp != NULL)
- *ticksp = ncp_ts->nc_ticks;
+ *tsp = ncp_ts->nc_time;
+ *ticksp = ncp_ts->nc_ticks;
}
#ifdef DEBUG_CACHE
@@ -1616,6 +1614,8 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st
int error;
bool whiteout;
u_short nc_flag;
+
+ MPASS((tsp == NULL && ticksp == NULL) || (tsp != NULL && ticksp != NULL));
#ifdef DEBUG_CACHE
if (__predict_false(!doingcache)) {
More information about the svn-src-all
mailing list