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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242127787-29842-3-git-send-email-fujita.tomonori@lab.ntt.co.jp>
Date:	Tue, 12 May 2009 20:29:47 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	jens.axboe@...cle.com
Cc:	tj@...nel.org, linux-kernel@...r.kernel.org,
	benh@...nel.crashing.org,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Subject: [PATCH] swim3: use blk_end_request instead of blk_update_request

swim3 is the only user of blk_update_request(). Let's use
blk_end_request instead of blk_update_request. swim3 doesn't need to
update a request manually. In addition, we can unexport
blk_update_request().

Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
---
 drivers/block/swim3.c |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 116d169..0dd619a 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -726,18 +726,21 @@ static irqreturn_t swim3_interrupt(int irq, void *dev_id)
 		resid = ld_le16(&cp->res_count);
 		if (intr & ERROR_INTR) {
 			n = fs->scount - 1 - resid / 512;
-			if (n > 0) {
-				blk_update_request(fd_req, 0, n << 9);
+			if (blk_end_request(fd_req, 0, n << 9)) {
 				fs->req_sector += n;
-			}
-			if (fs->retries < 5) {
-				++fs->retries;
-				act(fs);
+
+				if (fs->retries < 5) {
+					++fs->retries;
+					act(fs);
+				} else {
+					printk("swim3: error %sing block %ld (err=%x)\n",
+					       rq_data_dir(fd_req) == WRITE? "writ": "read",
+					       (long)blk_rq_pos(fd_req), err);
+					blk_end_request_all(fd_req, -EIO);
+					fd_req = NULL;
+					fs->state = idle;
+				}
 			} else {
-				printk("swim3: error %sing block %ld (err=%x)\n",
-				       rq_data_dir(fd_req) == WRITE? "writ": "read",
-				       (long)blk_rq_pos(fd_req), err);
-				blk_end_request_all(fd_req, -EIO);
 				fd_req = NULL;
 				fs->state = idle;
 			}
-- 
1.6.0.6

--
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