Lines Matching full:ac
354 bool afs_iterate_addresses(struct afs_addr_cursor *ac) in afs_iterate_addresses() argument
359 if (!ac->alist) in afs_iterate_addresses()
362 set = ac->alist->responded; in afs_iterate_addresses()
363 failed = ac->alist->failed; in afs_iterate_addresses()
364 _enter("%lx-%lx-%lx,%d", set, failed, ac->tried, ac->index); in afs_iterate_addresses()
366 ac->nr_iterations++; in afs_iterate_addresses()
368 set &= ~(failed | ac->tried); in afs_iterate_addresses()
373 index = READ_ONCE(ac->alist->preferred); in afs_iterate_addresses()
380 ac->index = index; in afs_iterate_addresses()
381 set_bit(index, &ac->tried); in afs_iterate_addresses()
382 ac->responded = false; in afs_iterate_addresses()
389 int afs_end_cursor(struct afs_addr_cursor *ac) in afs_end_cursor() argument
393 alist = ac->alist; in afs_end_cursor()
395 if (ac->responded && in afs_end_cursor()
396 ac->index != alist->preferred && in afs_end_cursor()
397 test_bit(ac->alist->preferred, &ac->tried)) in afs_end_cursor()
398 WRITE_ONCE(alist->preferred, ac->index); in afs_end_cursor()
400 ac->alist = NULL; in afs_end_cursor()
403 return ac->error; in afs_end_cursor()