From: Jens Axboe Date: Tue, 1 Mar 2011 20:04:39 +0000 (-0500) Subject: Merge commit 'v2.6.38-rc6' into for-2.6.39/core X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6fae9c25134baffbeeb20031479e7ff6f6d8eec0;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge commit 'v2.6.38-rc6' into for-2.6.39/core Conflicts: block/cfq-iosched.c Signed-off-by: Jens Axboe --- 6fae9c25134baffbeeb20031479e7ff6f6d8eec0 diff --cc block/cfq-iosched.c index 968455c57e1a,7be4c7959625..f27ff3efe6cd --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@@ -3681,13 -3705,13 +3705,13 @@@ new_queue } cfqq->allocated[rw]++; - atomic_inc(&cfqq->ref); - cfqq->ref++; - rq->elevator_private = cic; - rq->elevator_private2 = cfqq; - rq->elevator_private3 = cfq_ref_get_cfqg(cfqq->cfqg); spin_unlock_irqrestore(q->queue_lock, flags); ++ cfqq->ref++; + rq->elevator_private[0] = cic; + rq->elevator_private[1] = cfqq; + rq->elevator_private[2] = cfq_ref_get_cfqg(cfqq->cfqg); return 0; queue_fail: diff --cc include/linux/blkdev.h index 12bb426949e9,4d18ff34670a..e3ee74fc5903 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@@ -108,19 -108,14 +108,20 @@@ struct request /* * Three pointers are available for the IO schedulers, if they need - * more they have to dynamically allocate it. + * more they have to dynamically allocate it. Flush requests are + * never put on the IO scheduler. So let the flush fields share + * space with the three elevator_private pointers. */ - void *elevator_private; - void *elevator_private2; - void *elevator_private3; + union { + void *elevator_private[3]; + struct { + unsigned int seq; + struct list_head list; + } flush; + }; struct gendisk *rq_disk; + struct hd_struct *part; unsigned long start_time; #ifdef CONFIG_BLK_CGROUP unsigned long long start_time_ns;