Date: Wed, 26 Aug 2020 12:52:54 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364814 - head/sys/kern Message-ID: <202008261252.07QCqsPO027791@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008261252.07QCqsPO027791>