函数源码 |
Source File:fs\io-wq.c |
Create Date:2022-07-29 10:55:42 |
首页 | Copyright©Brick |
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | /* * Iterate the passed in list and call the specific function for each * worker that isn't exiting */ static bool io_wq_for_each_worker( struct io_wqe *wqe, bool (*func)( struct io_worker *, void *), void *data) { struct io_worker *worker; bool ret = false ; list_for_each_entry_rcu(worker, &wqe->all_list, all_list) { if (io_worker_get(worker)) { /* no task if node is/was offline */ if (worker->task) ret = func(worker, data); io_worker_release(worker); if (ret) break ; } } return ret; } |