Commit 30c0aa39 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/ptlrpc: Fix style vs open parenthesis alignment

This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a742c93b
...@@ -896,8 +896,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set) ...@@ -896,8 +896,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set)
RQ_PHASE_COMPLETE : RQ_PHASE_NEW; RQ_PHASE_COMPLETE : RQ_PHASE_NEW;
list_for_each(tmp, &set->set_requests) { list_for_each(tmp, &set->set_requests) {
struct ptlrpc_request *req = struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request, list_entry(tmp, struct ptlrpc_request, rq_set_chain);
rq_set_chain);
LASSERT(req->rq_phase == expected_phase); LASSERT(req->rq_phase == expected_phase);
n++; n++;
...@@ -909,8 +908,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set) ...@@ -909,8 +908,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set)
list_for_each_safe(tmp, next, &set->set_requests) { list_for_each_safe(tmp, next, &set->set_requests) {
struct ptlrpc_request *req = struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request, list_entry(tmp, struct ptlrpc_request, rq_set_chain);
rq_set_chain);
list_del_init(&req->rq_set_chain); list_del_init(&req->rq_set_chain);
LASSERT(req->rq_phase == expected_phase); LASSERT(req->rq_phase == expected_phase);
...@@ -1475,8 +1473,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) ...@@ -1475,8 +1473,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
INIT_LIST_HEAD(&comp_reqs); INIT_LIST_HEAD(&comp_reqs);
list_for_each_safe(tmp, next, &set->set_requests) { list_for_each_safe(tmp, next, &set->set_requests) {
struct ptlrpc_request *req = struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request, list_entry(tmp, struct ptlrpc_request, rq_set_chain);
rq_set_chain);
struct obd_import *imp = req->rq_import; struct obd_import *imp = req->rq_import;
int unregistered = 0; int unregistered = 0;
int rc = 0; int rc = 0;
...@@ -1618,8 +1615,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) ...@@ -1618,8 +1615,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
*/ */
list_del_init(&req->rq_list); list_del_init(&req->rq_list);
list_add_tail(&req->rq_list, list_add_tail(&req->rq_list,
&imp-> &imp->imp_delayed_list);
imp_delayed_list);
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
continue; continue;
} }
...@@ -1944,8 +1940,7 @@ int ptlrpc_expired_set(void *data) ...@@ -1944,8 +1940,7 @@ int ptlrpc_expired_set(void *data)
/* A timeout expired. See which reqs it applies to... */ /* A timeout expired. See which reqs it applies to... */
list_for_each(tmp, &set->set_requests) { list_for_each(tmp, &set->set_requests) {
struct ptlrpc_request *req = struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request, list_entry(tmp, struct ptlrpc_request, rq_set_chain);
rq_set_chain);
/* don't expire request waiting for context */ /* don't expire request waiting for context */
if (req->rq_wait_ctx) if (req->rq_wait_ctx)
...@@ -2001,8 +1996,7 @@ void ptlrpc_interrupted_set(void *data) ...@@ -2001,8 +1996,7 @@ void ptlrpc_interrupted_set(void *data)
list_for_each(tmp, &set->set_requests) { list_for_each(tmp, &set->set_requests) {
struct ptlrpc_request *req = struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request, list_entry(tmp, struct ptlrpc_request, rq_set_chain);
rq_set_chain);
if (req->rq_phase != RQ_PHASE_RPC && if (req->rq_phase != RQ_PHASE_RPC &&
req->rq_phase != RQ_PHASE_UNREGISTERING) req->rq_phase != RQ_PHASE_UNREGISTERING)
...@@ -2568,8 +2562,7 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req, ...@@ -2568,8 +2562,7 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,
ptlrpc_request_addref(req); ptlrpc_request_addref(req);
list_for_each_prev(tmp, &imp->imp_replay_list) { list_for_each_prev(tmp, &imp->imp_replay_list) {
struct ptlrpc_request *iter = struct ptlrpc_request *iter =
list_entry(tmp, struct ptlrpc_request, list_entry(tmp, struct ptlrpc_request, rq_replay_list);
rq_replay_list);
/* /*
* We may have duplicate transnos if we create and then * We may have duplicate transnos if we create and then
...@@ -2842,8 +2835,7 @@ void ptlrpc_abort_set(struct ptlrpc_request_set *set) ...@@ -2842,8 +2835,7 @@ void ptlrpc_abort_set(struct ptlrpc_request_set *set)
list_for_each_safe(pos, tmp, &set->set_requests) { list_for_each_safe(pos, tmp, &set->set_requests) {
struct ptlrpc_request *req = struct ptlrpc_request *req =
list_entry(pos, struct ptlrpc_request, list_entry(pos, struct ptlrpc_request, rq_set_chain);
rq_set_chain);
spin_lock(&req->rq_lock); spin_lock(&req->rq_lock);
if (req->rq_phase != RQ_PHASE_RPC) { if (req->rq_phase != RQ_PHASE_RPC) {
......
...@@ -1032,8 +1032,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, ...@@ -1032,8 +1032,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env,
spin_lock(&imp->imp_lock); spin_lock(&imp->imp_lock);
list_del(&imp->imp_conn_current->oic_item); list_del(&imp->imp_conn_current->oic_item);
list_add(&imp->imp_conn_current->oic_item, list_add(&imp->imp_conn_current->oic_item, &imp->imp_conn_list);
&imp->imp_conn_list);
imp->imp_last_success_conn = imp->imp_last_success_conn =
imp->imp_conn_current->oic_last_attempt; imp->imp_conn_current->oic_last_attempt;
......
...@@ -1751,8 +1751,7 @@ static int __req_capsule_offset(const struct req_capsule *pill, ...@@ -1751,8 +1751,7 @@ static int __req_capsule_offset(const struct req_capsule *pill,
int offset; int offset;
offset = field->rmf_offset[pill->rc_fmt->rf_idx][loc]; offset = field->rmf_offset[pill->rc_fmt->rf_idx][loc];
LASSERTF(offset > 0, "%s:%s, off=%d, loc=%d\n", LASSERTF(offset > 0, "%s:%s, off=%d, loc=%d\n", pill->rc_fmt->rf_name,
pill->rc_fmt->rf_name,
field->rmf_name, offset, loc); field->rmf_name, offset, loc);
offset--; offset--;
......
...@@ -518,8 +518,7 @@ static int ptlrpc_lprocfs_nrs_seq_show(struct seq_file *m, void *n) ...@@ -518,8 +518,7 @@ static int ptlrpc_lprocfs_nrs_seq_show(struct seq_file *m, void *n)
pol_idx = 0; pol_idx = 0;
list_for_each_entry(policy, &nrs->nrs_policy_list, list_for_each_entry(policy, &nrs->nrs_policy_list, pol_list) {
pol_list) {
LASSERT(pol_idx < num_pols); LASSERT(pol_idx < num_pols);
nrs_policy_get_info_locked(policy, &tmp); nrs_policy_get_info_locked(policy, &tmp);
...@@ -981,7 +980,7 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n) ...@@ -981,7 +980,7 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n)
s2dhms(&ts, ktime_get_real_seconds() - worstt); s2dhms(&ts, ktime_get_real_seconds() - worstt);
seq_printf(m, "%10s : cur %3u worst %3u (at %lld, " seq_printf(m, "%10s : cur %3u worst %3u (at %lld, "
DHMS_FMT" ago) ", "service", DHMS_FMT " ago) ", "service",
cur, worst, (s64)worstt, DHMS_VARS(&ts)); cur, worst, (s64)worstt, DHMS_VARS(&ts));
lprocfs_at_hist_helper(m, &svcpt->scp_at_estimate); lprocfs_at_hist_helper(m, &svcpt->scp_at_estimate);
......
...@@ -978,8 +978,7 @@ static void nrs_svcpt_cleanup_locked(struct ptlrpc_service_part *svcpt) ...@@ -978,8 +978,7 @@ static void nrs_svcpt_cleanup_locked(struct ptlrpc_service_part *svcpt)
nrs = nrs_svcpt2nrs(svcpt, hp); nrs = nrs_svcpt2nrs(svcpt, hp);
nrs->nrs_stopping = 1; nrs->nrs_stopping = 1;
list_for_each_entry_safe(policy, tmp, &nrs->nrs_policy_list, list_for_each_entry_safe(policy, tmp, &nrs->nrs_policy_list, pol_list) {
pol_list) {
rc = nrs_policy_unregister(nrs, policy->pol_desc->pd_name); rc = nrs_policy_unregister(nrs, policy->pol_desc->pd_name);
LASSERT(rc == 0); LASSERT(rc == 0);
} }
...@@ -1446,8 +1445,7 @@ ptlrpc_nrs_req_get_nolock0(struct ptlrpc_service_part *svcpt, bool hp, ...@@ -1446,8 +1445,7 @@ ptlrpc_nrs_req_get_nolock0(struct ptlrpc_service_part *svcpt, bool hp,
* Always try to drain requests from all NRS polices even if they are * Always try to drain requests from all NRS polices even if they are
* inactive, because the user can change policy status at runtime. * inactive, because the user can change policy status at runtime.
*/ */
list_for_each_entry(policy, &nrs->nrs_policy_queued, list_for_each_entry(policy, &nrs->nrs_policy_queued, pol_list_queued) {
pol_list_queued) {
nrq = nrs_request_get(policy, peek, force); nrq = nrs_request_get(policy, peek, force);
if (nrq) { if (nrq) {
if (likely(!peek)) { if (likely(!peek)) {
...@@ -1599,8 +1597,7 @@ void ptlrpc_nrs_fini(void) ...@@ -1599,8 +1597,7 @@ void ptlrpc_nrs_fini(void)
struct ptlrpc_nrs_pol_desc *desc; struct ptlrpc_nrs_pol_desc *desc;
struct ptlrpc_nrs_pol_desc *tmp; struct ptlrpc_nrs_pol_desc *tmp;
list_for_each_entry_safe(desc, tmp, &nrs_core.nrs_policies, list_for_each_entry_safe(desc, tmp, &nrs_core.nrs_policies, pd_list) {
pd_list) {
list_del_init(&desc->pd_list); list_del_init(&desc->pd_list);
kfree(desc); kfree(desc);
} }
......
...@@ -404,7 +404,8 @@ EXPORT_SYMBOL(ptlrpc_pinger_del_import); ...@@ -404,7 +404,8 @@ EXPORT_SYMBOL(ptlrpc_pinger_del_import);
* be called when timeout happens. * be called when timeout happens.
*/ */
static struct timeout_item *ptlrpc_new_timeout(int time, static struct timeout_item *ptlrpc_new_timeout(int time,
enum timeout_event event, timeout_cb_t cb, void *data) enum timeout_event event,
timeout_cb_t cb, void *data)
{ {
struct timeout_item *ti; struct timeout_item *ti;
......
...@@ -210,8 +210,7 @@ static int ptlrpcd_steal_rqset(struct ptlrpc_request_set *des, ...@@ -210,8 +210,7 @@ static int ptlrpcd_steal_rqset(struct ptlrpc_request_set *des,
rq_set_chain); rq_set_chain);
req->rq_set = des; req->rq_set = des;
} }
list_splice_init(&src->set_new_requests, list_splice_init(&src->set_new_requests, &des->set_requests);
&des->set_requests);
rc = atomic_read(&src->set_new_count); rc = atomic_read(&src->set_new_count);
atomic_add(rc, &des->set_remaining); atomic_add(rc, &des->set_remaining);
atomic_set(&src->set_new_count, 0); atomic_set(&src->set_new_count, 0);
......
...@@ -107,8 +107,7 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight) ...@@ -107,8 +107,7 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight)
/* Replay all the committed open requests on committed_list first */ /* Replay all the committed open requests on committed_list first */
if (!list_empty(&imp->imp_committed_list)) { if (!list_empty(&imp->imp_committed_list)) {
tmp = imp->imp_committed_list.prev; tmp = imp->imp_committed_list.prev;
req = list_entry(tmp, struct ptlrpc_request, req = list_entry(tmp, struct ptlrpc_request, rq_replay_list);
rq_replay_list);
/* The last request on committed_list hasn't been replayed */ /* The last request on committed_list hasn't been replayed */
if (req->rq_transno > last_transno) { if (req->rq_transno > last_transno) {
...@@ -195,8 +194,7 @@ int ptlrpc_resend(struct obd_import *imp) ...@@ -195,8 +194,7 @@ int ptlrpc_resend(struct obd_import *imp)
return -1; return -1;
} }
list_for_each_entry_safe(req, next, &imp->imp_sending_list, list_for_each_entry_safe(req, next, &imp->imp_sending_list, rq_list) {
rq_list) {
LASSERTF((long)req > PAGE_CACHE_SIZE && req != LP_POISON, LASSERTF((long)req > PAGE_CACHE_SIZE && req != LP_POISON,
"req %p bad\n", req); "req %p bad\n", req);
LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req); LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req);
......
...@@ -808,8 +808,7 @@ static void ptlrpc_server_drop_request(struct ptlrpc_request *req) ...@@ -808,8 +808,7 @@ static void ptlrpc_server_drop_request(struct ptlrpc_request *req)
*/ */
LASSERT(atomic_read(&rqbd->rqbd_req.rq_refcount) == LASSERT(atomic_read(&rqbd->rqbd_req.rq_refcount) ==
0); 0);
list_add_tail(&rqbd->rqbd_list, list_add_tail(&rqbd->rqbd_list, &svcpt->scp_rqbd_idle);
&svcpt->scp_rqbd_idle);
} }
spin_unlock(&svcpt->scp_lock); spin_unlock(&svcpt->scp_lock);
...@@ -957,8 +956,7 @@ static int ptlrpc_at_add_timed(struct ptlrpc_request *req) ...@@ -957,8 +956,7 @@ static int ptlrpc_at_add_timed(struct ptlrpc_request *req)
/* latest rpcs will have the latest deadlines in the list, /* latest rpcs will have the latest deadlines in the list,
* so search backward. * so search backward.
*/ */
list_for_each_entry_reverse(rq, list_for_each_entry_reverse(rq, &array->paa_reqs_array[index],
&array->paa_reqs_array[index],
rq_timed_list) { rq_timed_list) {
if (req->rq_deadline >= rq->rq_deadline) { if (req->rq_deadline >= rq->rq_deadline) {
list_add(&req->rq_timed_list, list_add(&req->rq_timed_list,
...@@ -970,8 +968,7 @@ static int ptlrpc_at_add_timed(struct ptlrpc_request *req) ...@@ -970,8 +968,7 @@ static int ptlrpc_at_add_timed(struct ptlrpc_request *req)
/* Add the request at the head of the list */ /* Add the request at the head of the list */
if (list_empty(&req->rq_timed_list)) if (list_empty(&req->rq_timed_list))
list_add(&req->rq_timed_list, list_add(&req->rq_timed_list, &array->paa_reqs_array[index]);
&array->paa_reqs_array[index]);
spin_lock(&req->rq_lock); spin_lock(&req->rq_lock);
req->rq_at_linked = 1; req->rq_at_linked = 1;
...@@ -1179,8 +1176,7 @@ static void ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt) ...@@ -1179,8 +1176,7 @@ static void ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)
count = array->paa_count; count = array->paa_count;
while (count > 0) { while (count > 0) {
count -= array->paa_reqs_count[index]; count -= array->paa_reqs_count[index];
list_for_each_entry_safe(rq, n, list_for_each_entry_safe(rq, n, &array->paa_reqs_array[index],
&array->paa_reqs_array[index],
rq_timed_list) { rq_timed_list) {
if (rq->rq_deadline > now + at_early_margin) { if (rq->rq_deadline > now + at_early_margin) {
/* update the earliest deadline */ /* update the earliest deadline */
...@@ -1278,8 +1274,7 @@ static int ptlrpc_server_hpreq_init(struct ptlrpc_service_part *svcpt, ...@@ -1278,8 +1274,7 @@ static int ptlrpc_server_hpreq_init(struct ptlrpc_service_part *svcpt,
} }
spin_lock_bh(&req->rq_export->exp_rpc_lock); spin_lock_bh(&req->rq_export->exp_rpc_lock);
list_add(&req->rq_exp_list, list_add(&req->rq_exp_list, &req->rq_export->exp_hp_rpcs);
&req->rq_export->exp_hp_rpcs);
spin_unlock_bh(&req->rq_export->exp_rpc_lock); spin_unlock_bh(&req->rq_export->exp_rpc_lock);
} }
...@@ -2235,8 +2230,7 @@ static int ptlrpc_hr_main(void *arg) ...@@ -2235,8 +2230,7 @@ static int ptlrpc_hr_main(void *arg)
while (!list_empty(&replies)) { while (!list_empty(&replies)) {
struct ptlrpc_reply_state *rs; struct ptlrpc_reply_state *rs;
rs = list_entry(replies.prev, rs = list_entry(replies.prev, struct ptlrpc_reply_state,
struct ptlrpc_reply_state,
rs_list); rs_list);
list_del_init(&rs->rs_list); list_del_init(&rs->rs_list);
ptlrpc_handle_rs(rs); ptlrpc_handle_rs(rs);
...@@ -2289,8 +2283,7 @@ static int ptlrpc_start_hr_threads(void) ...@@ -2289,8 +2283,7 @@ static int ptlrpc_start_hr_threads(void)
task = kthread_run(ptlrpc_hr_main, task = kthread_run(ptlrpc_hr_main,
&hrp->hrp_thrs[j], &hrp->hrp_thrs[j],
"ptlrpc_hr%02d_%03d", "ptlrpc_hr%02d_%03d",
hrp->hrp_cpt, hrp->hrp_cpt, hrt->hrt_id);
hrt->hrt_id);
if (IS_ERR(task)) { if (IS_ERR(task)) {
rc = PTR_ERR(task); rc = PTR_ERR(task);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment