From ba2541f244daedc885f1140bde0a2bc8e278db2d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 20 Apr 2003 00:49:47 -0700 Subject: [PATCH] [PATCH] rename end_request in floppy() and raid1 In preparation of getting rid of the LOCAL_END_REQUEST mess. --- drivers/block/floppy.c | 6 +++--- drivers/block/floppy98.c | 6 +++--- drivers/md/raid1.c | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index da6cf6e94603a..c2387a7be5f42 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -2293,7 +2293,7 @@ static int do_format(kdev_t device, struct format_descr *tmp_format_req) * ============================= */ -static inline void end_request(struct request *req, int uptodate) +static void floppy_end_request(struct request *req, int uptodate) { if (end_that_request_first(req, uptodate, current_count_sectors)) return; @@ -2334,7 +2334,7 @@ static void request_done(int uptodate) /* unlock chained buffers */ spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 1); + floppy_end_request(req, 1); spin_unlock_irqrestore(q->queue_lock, flags); } else { if (rq_data_dir(req) == WRITE) { @@ -2348,7 +2348,7 @@ static void request_done(int uptodate) DRWE->last_error_generation = DRS->generation; } spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 0); + floppy_end_request(req, 0); spin_unlock_irqrestore(q->queue_lock, flags); } } diff --git a/drivers/block/floppy98.c b/drivers/block/floppy98.c index 77dfe8a1841b7..c3322cb2d8c22 100644 --- a/drivers/block/floppy98.c +++ b/drivers/block/floppy98.c @@ -2348,7 +2348,7 @@ static int do_format(kdev_t device, struct format_descr *tmp_format_req) * ============================= */ -static inline void end_request(struct request *req, int uptodate) +static void floppy_end_request(struct request *req, int uptodate) { if (end_that_request_first(req, uptodate, current_count_sectors)) return; @@ -2389,7 +2389,7 @@ static void request_done(int uptodate) /* unlock chained buffers */ spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 1); + floppy_end_request(req, 1); spin_unlock_irqrestore(q->queue_lock, flags); } else { if (rq_data_dir(req) == WRITE) { @@ -2403,7 +2403,7 @@ static void request_done(int uptodate) DRWE->last_error_generation = DRS->generation; } spin_lock_irqsave(q->queue_lock, flags); - end_request(req, 0); + floppy_end_request(req, 0); spin_unlock_irqrestore(q->queue_lock, flags); } } diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 21e3129200962..4e8aeb43f1d6a 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -258,7 +258,7 @@ static inline void update_head_pos(int disk, r1bio_t *r1_bio) r1_bio->sector + (r1_bio->master_bio->bi_size >> 9); } -static int end_request(struct bio *bio, unsigned int bytes_done, int error) +static int raid1_end_request(struct bio *bio, unsigned int bytes_done, int error) { int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); @@ -496,7 +496,7 @@ static int make_request(request_queue_t *q, struct bio * bio) read_bio->bi_sector = r1_bio->sector + mirror->rdev->data_offset; read_bio->bi_bdev = mirror->rdev->bdev; - read_bio->bi_end_io = end_request; + read_bio->bi_end_io = raid1_end_request; read_bio->bi_rw = r1_bio->cmd; read_bio->bi_private = r1_bio; @@ -531,7 +531,7 @@ static int make_request(request_queue_t *q, struct bio * bio) mbio->bi_sector = r1_bio->sector + conf->mirrors[i].rdev->data_offset; mbio->bi_bdev = conf->mirrors[i].rdev->bdev; - mbio->bi_end_io = end_request; + mbio->bi_end_io = raid1_end_request; mbio->bi_rw = r1_bio->cmd; mbio->bi_private = r1_bio; @@ -551,11 +551,11 @@ static int make_request(request_queue_t *q, struct bio * bio) /* * We have to be a bit careful about the semaphore above, thats * why we start the requests separately. Since generic_make_request() - * can sleep, this is the safer solution. Imagine, end_request + * can sleep, this is the safer solution. Imagine, raid1_end_request * decreasing the semaphore before we could have set it up ... * We could play tricks with the semaphore (presetting it and * correcting at the end if sum_bios is not 'n' but we have to - * do end_request by hand if all requests finish until we had a + * do raid1_end_request by hand if all requests finish until we had a * chance to set up the semaphore correctly ... lots of races). */ -- 2.53.0