* [PATCH 2/2] staging: lustre: ldlm: simplify rc initialization
@ 2014-09-01 20:21 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2014-09-01 20:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: kernel-janitors, devel, linux-kernel, Dilger, Andreas, Drokin,
Oleg, Peng Tao
From: Julia Lawall <Julia.Lawall@lip6.fr>
Simplify initialization of rc to take advantage of the fact that it is done
at statement level.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 655a1c7..9ce437b 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -569,7 +569,8 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
if (lvb_len != 0)
rc = ldlm_fill_lvb(lock, &req->rq_pill, RCL_SERVER,
lvb, size);
- rc = (rc != 0 ? rc : ELDLM_LOCK_ABORTED);
+ if (rc = 0)
+ rc = ELDLM_LOCK_ABORTED;
goto cleanup;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] staging: lustre: ldlm: simplify rc initialization
@ 2014-09-01 20:21 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2014-09-01 20:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: kernel-janitors, devel, linux-kernel, Dilger, Andreas, Drokin,
Oleg, Peng Tao
From: Julia Lawall <Julia.Lawall@lip6.fr>
Simplify initialization of rc to take advantage of the fact that it is done
at statement level.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 655a1c7..9ce437b 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -569,7 +569,8 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
if (lvb_len != 0)
rc = ldlm_fill_lvb(lock, &req->rq_pill, RCL_SERVER,
lvb, size);
- rc = (rc != 0 ? rc : ELDLM_LOCK_ABORTED);
+ if (rc == 0)
+ rc = ELDLM_LOCK_ABORTED;
goto cleanup;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-01 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01 20:21 [PATCH 2/2] staging: lustre: ldlm: simplify rc initialization Julia Lawall
2014-09-01 20:21 ` Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.