Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.26-rc1 /block/blk-barrier.c

Filename:/block/blk-barrier.c
Lines Added:4
Lines Deleted:10
Also changed in: (Previous) 2.6.25-git20  2.6.25-git19  2.6.25-git18  2.6.25-git17  2.6.25-git16  2.6.25-git15 
(Following) 2.6.26-rc2  2.6.26-rc3  2.6.26-rc4  2.6.26-rc5  2.6.26-rc6  2.6.26-rc7 

Location
[  2.6.26-rc1
  [  block
     o  blk-barrier.c

Patch

diff --git a/block/blk-barrier.c b/block/blk-barrier.c
index 55c5f1f..a09ead1 100644
--- a/block/blk-barrier.c
+++ b/block/blk-barrier.c
@@ -26,8 +26,7 @@ int blk_queue_ordered(struct request_queue *q, unsigned ordered,
 {
    if (ordered & (QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH) &&
        prepare_flush_fn == NULL) {
-      printk(KERN_ERR "%s: prepare_flush_fn required\n",
-                        __FUNCTION__);
+      printk(KERN_ERR "%s: prepare_flush_fn required\n", __func__);
       return -EINVAL;
    }
 
@@ -53,7 +52,7 @@ EXPORT_SYMBOL(blk_queue_ordered);
 /*
  * Cache flushing for ordered writes handling
  */
-inline unsigned blk_ordered_cur_seq(struct request_queue *q)
+unsigned blk_ordered_cur_seq(struct request_queue *q)
 {
    if (!q->ordseq)
       return 0;
@@ -143,10 +142,8 @@ static void queue_flush(struct request_queue *q, unsigned which)
       end_io = post_flush_end_io;
    }
 
+   blk_rq_init(q, rq);
    rq->cmd_flags = REQ_HARDBARRIER;
-   rq_init(q, rq);
-   rq->elevator_private = NULL;
-   rq->elevator_private2 = NULL;
    rq->rq_disk = q->bar_rq.rq_disk;
    rq->end_io = end_io;
    q->prepare_flush_fn(q, rq);
@@ -167,14 +164,11 @@ static inline struct request *start_ordered(struct request_queue *q,
    blkdev_dequeue_request(rq);
    q->orig_bar_rq = rq;
    rq = &q->bar_rq;
-   rq->cmd_flags = 0;
-   rq_init(q, rq);
+   blk_rq_init(q, rq);
    if (bio_data_dir(q->orig_bar_rq->bio) == WRITE)
       rq->cmd_flags |= REQ_RW;
    if (q->ordered & QUEUE_ORDERED_FUA)
       rq->cmd_flags |= REQ_FUA;
-   rq->elevator_private = NULL;
-   rq->elevator_private2 = NULL;
    init_request_from_bio(rq, q->orig_bar_rq->bio);
    rq->end_io = bar_end_io;
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.