[PATCH] fix use of REQ_WRITE in blk_rq_map_kern()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Beulich
Date: Friday, August 27, 2010 - 7:33 am

REQ_WRITE clearly isn't meant to be used as a shift count, other than
BIO_RW was.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

---
 block/blk-map.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.36-rc2/block/blk-map.c	2010-08-24 15:57:04.000000000 +0200
+++ 2.6.36-rc2-blk-map-REQ_WRITE/block/blk-map.c	2010-08-27 12:57:08.000000000 +0200
@@ -307,7 +307,7 @@ int blk_rq_map_kern(struct request_queue
 		return PTR_ERR(bio);
 
 	if (rq_data_dir(rq) == WRITE)
-		bio->bi_rw |= (1 << REQ_WRITE);
+		bio->bi_rw |= REQ_WRITE;
 
 	if (do_copy)
 		rq->cmd_flags |= REQ_COPY_USER;



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fix use of REQ_WRITE in blk_rq_map_kern(), Jan Beulich, (Fri Aug 27, 7:33 am)