* Move a hot negative entry to the cold list. */
| 1156 | * Move a hot negative entry to the cold list. |
| 1157 | */ |
| 1158 | static void |
| 1159 | cache_neg_demote_locked(struct namecache *ncp) |
| 1160 | { |
| 1161 | struct neglist *nl; |
| 1162 | struct negstate *ns; |
| 1163 | |
| 1164 | ns = NCP2NEGSTATE(ncp); |
| 1165 | nl = NCP2NEGLIST(ncp); |
| 1166 | mtx_assert(&nl->nl_lock, MA_OWNED); |
| 1167 | MPASS(ns->neg_flag & NEG_HOT); |
| 1168 | TAILQ_REMOVE(&nl->nl_hotlist, ncp, nc_dst); |
| 1169 | TAILQ_INSERT_TAIL(&nl->nl_list, ncp, nc_dst); |
| 1170 | nl->nl_hotnum--; |
| 1171 | ns->neg_flag &= ~NEG_HOT; |
| 1172 | atomic_store_char(&ns->neg_hit, 0); |
| 1173 | } |
| 1174 | |
| 1175 | /* |
| 1176 | * Move a negative entry to the hot list if it matches the lookup. |
no test coverage detected