The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4651db56c7d785a08f3ffdb384f88a77af209ac9
commit 4651db56c7d785a08f3ffdb384f88a77af209ac9 Author: Mateusz Guzik <mjgu...@gmail.com> AuthorDate: 2020-12-28 07:34:29 +0000 Commit: Mateusz Guzik <m...@freebsd.org> CommitDate: 2021-01-01 00:10:42 +0000 cache: remove a branch from mount point checking Tested by: pho --- sys/kern/vfs_cache.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index cde2fde8a9ec..d5e5e6e3d018 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4569,8 +4569,7 @@ static bool cache_fplookup_mp_supported(struct mount *mp) { - if (mp == NULL) - return (false); + MPASS(mp != NULL); if ((mp->mnt_kern_flag & MNTK_FPLOOKUP) == 0) return (false); return (true); @@ -4947,8 +4946,8 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl) cache_fpl_aborted(fpl); goto out; } - mp = atomic_load_ptr(&fpl->dvp->v_mount); - if (!cache_fplookup_mp_supported(mp)) { + mp = atomic_load_ptr(&dvp->v_mount); + if (__predict_false(mp == NULL || !cache_fplookup_mp_supported(mp))) { cache_fpl_aborted(fpl); goto out; } _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"