* Move a negative entry to the hot list. */
| 1136 | * Move a negative entry to the hot list. |
| 1137 | */ |
| 1138 | static void |
| 1139 | cache_neg_promote_locked(struct namecache *ncp) |
| 1140 | { |
| 1141 | struct neglist *nl; |
| 1142 | struct negstate *ns; |
| 1143 | |
| 1144 | ns = NCP2NEGSTATE(ncp); |
| 1145 | nl = NCP2NEGLIST(ncp); |
| 1146 | mtx_assert(&nl->nl_lock, MA_OWNED); |
| 1147 | if ((ns->neg_flag & NEG_HOT) == 0) { |
| 1148 | TAILQ_REMOVE(&nl->nl_list, ncp, nc_dst); |
| 1149 | TAILQ_INSERT_TAIL(&nl->nl_hotlist, ncp, nc_dst); |
| 1150 | nl->nl_hotnum++; |
| 1151 | ns->neg_flag |= NEG_HOT; |
| 1152 | } |
| 1153 | } |
| 1154 | |
| 1155 | /* |
| 1156 | * Move a hot negative entry to the cold list. |
no test coverage detected