X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fptlrpc%2Fservice.c;h=ef341fdaf3901fc4bf8438c63c633759d4e1c876;hp=fefcb29133c8d03fd65830eb847232948bf4882c;hb=0098396983e1075668414aa5298a4990e61ffbda;hpb=135b5c0009e5201ac70394ee1fe98e523fe86072 diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index fefcb29..ef341fd 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -65,7 +65,7 @@ static void ptlrpc_server_hpreq_fini(struct ptlrpc_request *req); static void ptlrpc_at_remove_timed(struct ptlrpc_request *req); /** Holds a list of all PTLRPC services */ -struct list_head ptlrpc_all_services; +LIST_HEAD(ptlrpc_all_services); /** Used to protect the \e ptlrpc_all_services list */ struct mutex ptlrpc_all_services_mutex; @@ -1526,7 +1526,7 @@ static int ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt) { struct ptlrpc_at_array *array = &svcpt->scp_at_array; struct ptlrpc_request *rq, *n; - struct list_head work_list; + LIST_HEAD(work_list); __u32 index, count; time64_t deadline; time64_t now = ktime_get_real_seconds(); @@ -1560,7 +1560,6 @@ static int ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt) * We're close to a timeout, and we don't know how much longer the * server will take. Send early replies to everyone expiring soon. */ - INIT_LIST_HEAD(&work_list); deadline = -1; div_u64_rem(array->paa_deadline, array->paa_size, &index); count = array->paa_count; @@ -2948,7 +2947,7 @@ static int ptlrpc_hr_main(void *arg) { struct ptlrpc_hr_thread *hrt = (struct ptlrpc_hr_thread *)arg; struct ptlrpc_hr_partition *hrp = hrt->hrt_partition; - struct list_head replies; + LIST_HEAD(replies); struct lu_env *env; int rc; @@ -2956,7 +2955,6 @@ static int ptlrpc_hr_main(void *arg) if (env == NULL) RETURN(-ENOMEM); - INIT_LIST_HEAD(&replies); unshare_fs_struct(); rc = cfs_cpt_bind(ptlrpc_hr.hr_cpt_table, hrp->hrp_cpt); @@ -3077,14 +3075,13 @@ static int ptlrpc_start_hr_threads(void) static void ptlrpc_svcpt_stop_threads(struct ptlrpc_service_part *svcpt) { struct ptlrpc_thread *thread; - struct list_head zombie; + LIST_HEAD(zombie); ENTRY; CDEBUG(D_INFO, "Stopping threads for service %s\n", svcpt->scp_service->srv_name); - INIT_LIST_HEAD(&zombie); spin_lock(&svcpt->scp_lock); /* let the thread know that we would like it to stop asap */ list_for_each_entry(thread, &svcpt->scp_threads, t_link)