Date: Thu, 6 Aug 2020 04:20:14 +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: r363939 - head/sys/kern Message-ID: <202008060420.0764KEM1007341@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Aug 6 04:20:14 2020 New Revision: 363939 URL: https://svnweb.freebsd.org/changeset/base/363939 Log: cache: add more predicts for failing conditions Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Aug 6 04:19:47 2020 (r363938) +++ head/sys/kern/vfs_cache.c Thu Aug 6 04:20:14 2020 (r363939) @@ -3389,7 +3389,7 @@ cache_fplookup_final_child(struct cache_fpl *fpl, enum if ((cnp->cn_flags & LOCKSHARED) == 0) lkflags = LK_EXCLUSIVE; error = vget_finish(tvp, lkflags, tvs); - if (error != 0) { + if (__predict_false(error != 0)) { return (cache_fpl_aborted(fpl)); } } else { @@ -3442,7 +3442,7 @@ cache_fplookup_final_withparent(struct cache_fpl *fpl) if ((cnp->cn_flags & LOCKPARENT) != 0) { error = vget_finish(dvp, LK_EXCLUSIVE, dvs); - if (error != 0) { + if (__predict_false(error != 0)) { vget_abort(tvp, tvs); return (cache_fpl_aborted(fpl)); } @@ -3460,7 +3460,7 @@ cache_fplookup_final_withparent(struct cache_fpl *fpl) } error = cache_fplookup_final_child(fpl, tvs); - if (error != 0) { + if (__predict_false(error != 0)) { MPASS(fpl->status == CACHE_FPL_STATUS_ABORTED); if ((cnp->cn_flags & LOCKPARENT) != 0) vput(dvp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008060420.0764KEM1007341>