From 802ba064c49f655d20fed563f2a4924c8256ea10 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 13 Dec 2006 00:34:13 -0800 Subject: [PATCH] md: Don't assume that READ==0 and WRITE==1 - use the names explicitly Thanks Jens for alerting me to this. Cc: Jens Axboe Cc: Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/faulty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/md/faulty.c') diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index a7a5ab554338..4ebd0f2a75ec 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c @@ -173,7 +173,7 @@ static int make_request(request_queue_t *q, struct bio *bio) conf_t *conf = (conf_t*)mddev->private; int failit = 0; - if (bio->bi_rw & 1) { + if (bio_data_dir(bio) == WRITE) { /* write request */ if (atomic_read(&conf->counters[WriteAll])) { /* special case - don't decrement, don't generic_make_request, -- cgit v1.2.3