cache: make it mandatory to request both timestamps or neither

This commit is contained in:
Mateusz Guzik 2020-08-26 12:52:54 +00:00
parent eef63775b6
commit 66fa11c898
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364814

View File

@ -415,14 +415,12 @@ cache_out_ts(struct namecache *ncp, struct timespec *tsp, int *ticksp)
(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
@ -1617,6 +1615,8 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
bool whiteout;
u_short nc_flag;
MPASS((tsp == NULL && ticksp == NULL) || (tsp != NULL && ticksp != NULL));
#ifdef DEBUG_CACHE
if (__predict_false(!doingcache)) {
cnp->cn_flags &= ~MAKEENTRY;