• Home
  • Raw
  • Download

Lines Matching refs:u

129 		struct unix_sock *u = unix_sk(s);  in unix_inflight()  local
131 if (atomic_long_inc_return(&u->inflight) == 1) { in unix_inflight()
132 BUG_ON(!list_empty(&u->link)); in unix_inflight()
133 list_add_tail(&u->link, &gc_inflight_list); in unix_inflight()
135 BUG_ON(list_empty(&u->link)); in unix_inflight()
146 struct unix_sock *u = unix_sk(s); in unix_notinflight() local
148 BUG_ON(list_empty(&u->link)); in unix_notinflight()
149 if (atomic_long_dec_and_test(&u->inflight)) in unix_notinflight()
150 list_del_init(&u->link); in unix_notinflight()
181 struct unix_sock *u = unix_sk(sk); in scan_inflight() local
188 if (test_bit(UNIX_GC_CANDIDATE, &u->gc_flags)) { in scan_inflight()
190 func(u); in scan_inflight()
211 struct unix_sock *u; in scan_children() local
220 u = unix_sk(skb->sk); in scan_children()
226 BUG_ON(!list_empty(&u->link)); in scan_children()
227 list_add_tail(&u->link, &embryos); in scan_children()
232 u = list_entry(embryos.next, struct unix_sock, link); in scan_children()
233 scan_inflight(&u->sk, func, hitlist); in scan_children()
234 list_del_init(&u->link); in scan_children()
249 static void inc_inflight_move_tail(struct unix_sock *u) in inc_inflight_move_tail() argument
251 atomic_long_inc(&u->inflight); in inc_inflight_move_tail()
257 if (test_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags)) in inc_inflight_move_tail()
258 list_move_tail(&u->link, &gc_candidates); in inc_inflight_move_tail()
278 struct unix_sock *u; in unix_gc() local
307 list_for_each_entry_safe(u, next, &gc_inflight_list, link) { in unix_gc()
311 total_refs = file_count(u->sk.sk_socket->file); in unix_gc()
312 inflight_refs = atomic_long_read(&u->inflight); in unix_gc()
317 list_move_tail(&u->link, &gc_candidates); in unix_gc()
318 __set_bit(UNIX_GC_CANDIDATE, &u->gc_flags); in unix_gc()
319 __set_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags); in unix_gc()
327 list_for_each_entry(u, &gc_candidates, link) in unix_gc()
328 scan_children(&u->sk, dec_inflight, NULL); in unix_gc()
340 u = list_entry(cursor.next, struct unix_sock, link); in unix_gc()
343 list_move(&cursor, &u->link); in unix_gc()
345 if (atomic_long_read(&u->inflight) > 0) { in unix_gc()
346 list_move_tail(&u->link, &not_cycle_list); in unix_gc()
347 __clear_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags); in unix_gc()
348 scan_children(&u->sk, inc_inflight_move_tail, NULL); in unix_gc()
358 u = list_entry(not_cycle_list.next, struct unix_sock, link); in unix_gc()
359 __clear_bit(UNIX_GC_CANDIDATE, &u->gc_flags); in unix_gc()
360 list_move_tail(&u->link, &gc_inflight_list); in unix_gc()
369 list_for_each_entry(u, &gc_candidates, link) in unix_gc()
370 scan_children(&u->sk, inc_inflight, &hitlist); in unix_gc()