lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1409602870-4642-2-git-send-email-Julia.Lawall@lip6.fr>
Date:	Mon,  1 Sep 2014 22:21:10 +0200
From:	Julia Lawall <Julia.Lawall@...6.fr>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	kernel-janitors@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org,
	"Dilger, Andreas" <andreas.dilger@...el.com>,
	"Drokin, Oleg" <oleg.drokin@...el.com>,
	Peng Tao <bergwolf@...il.com>
Subject: [PATCH 2/2] staging: lustre: ldlm: simplify rc initialization

From: Julia Lawall <Julia.Lawall@...6.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@...6.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;
 	}
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ