| 4822 | } |
| 4823 | |
| 4824 | static int __noinline |
| 4825 | cache_fplookup_neg(struct cache_fpl *fpl, struct namecache *ncp, uint32_t hash) |
| 4826 | { |
| 4827 | u_char nc_flag; |
| 4828 | bool neg_promote; |
| 4829 | |
| 4830 | nc_flag = atomic_load_char(&ncp->nc_flag); |
| 4831 | MPASS((nc_flag & NCF_NEGATIVE) != 0); |
| 4832 | /* |
| 4833 | * If they want to create an entry we need to replace this one. |
| 4834 | */ |
| 4835 | if (__predict_false(fpl->cnp->cn_nameiop != LOOKUP)) { |
| 4836 | fpl->tvp = NULL; |
| 4837 | return (cache_fplookup_modifying(fpl)); |
| 4838 | } |
| 4839 | neg_promote = cache_neg_hit_prep(ncp); |
| 4840 | if (!cache_fpl_neg_ncp_canuse(ncp)) { |
| 4841 | cache_neg_hit_abort(ncp); |
| 4842 | return (cache_fpl_partial(fpl)); |
| 4843 | } |
| 4844 | if (neg_promote) { |
| 4845 | return (cache_fplookup_negative_promote(fpl, ncp, hash)); |
| 4846 | } |
| 4847 | cache_neg_hit_finish(ncp); |
| 4848 | cache_fpl_smr_exit(fpl); |
| 4849 | return (cache_fpl_handled_error(fpl, ENOENT)); |
| 4850 | } |
| 4851 | |
| 4852 | /* |
| 4853 | * Resolve a symlink. Called by filesystem-specific routines. |
no test coverage detected