Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block

* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
[PATCH] block layer: ioprio_best function fix
[PATCH] ide-cd: fix breakage with internally queued commands
[PATCH] block layer: elv_iosched_show should get elv_list_lock
[PATCH] splice: fix pipe_to_file() ->prepare_write() error path
[PATCH] block layer: elevator_find function cleanup
[PATCH] elevator: elevator_type member not used

+14 -21
+7 -10
block/elevator.c
··· 93 93 94 94 static struct elevator_type *elevator_find(const char *name) 95 95 { 96 - struct elevator_type *e = NULL; 96 + struct elevator_type *e; 97 97 struct list_head *entry; 98 98 99 99 list_for_each(entry, &elv_list) { 100 - struct elevator_type *__e; 101 100 102 - __e = list_entry(entry, struct elevator_type, list); 101 + e = list_entry(entry, struct elevator_type, list); 103 102 104 - if (!strcmp(__e->elevator_name, name)) { 105 - e = __e; 106 - break; 107 - } 103 + if (!strcmp(e->elevator_name, name)) 104 + return e; 108 105 } 109 106 110 - return e; 107 + return NULL; 111 108 } 112 109 113 110 static void elevator_put(struct elevator_type *e) ··· 1085 1088 struct list_head *entry; 1086 1089 int len = 0; 1087 1090 1088 - spin_lock_irq(q->queue_lock); 1091 + spin_lock_irq(&elv_list_lock); 1089 1092 list_for_each(entry, &elv_list) { 1090 1093 struct elevator_type *__e; 1091 1094 ··· 1095 1098 else 1096 1099 len += sprintf(name+len, "%s ", __e->elevator_name); 1097 1100 } 1098 - spin_unlock_irq(q->queue_lock); 1101 + spin_unlock_irq(&elv_list_lock); 1099 1102 1100 1103 len += sprintf(len+name, "\n"); 1101 1104 return len;
+3 -2
drivers/ide/ide-cd.c
··· 597 597 struct cdrom_info *cd = drive->driver_data; 598 598 599 599 ide_init_drive_cmd(rq); 600 - rq->cmd_type = REQ_TYPE_BLOCK_PC; 600 + rq->cmd_type = REQ_TYPE_ATA_PC; 601 601 rq->rq_disk = cd->disk; 602 602 } 603 603 ··· 2023 2023 } 2024 2024 info->last_block = block; 2025 2025 return action; 2026 - } else if (rq->cmd_type == REQ_TYPE_SENSE) { 2026 + } else if (rq->cmd_type == REQ_TYPE_SENSE || 2027 + rq->cmd_type == REQ_TYPE_ATA_PC) { 2027 2028 return cdrom_do_packet_command(drive); 2028 2029 } else if (blk_pc_request(rq)) { 2029 2030 return cdrom_do_block_pc(drive, rq);
-5
fs/ioprio.c
··· 150 150 unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); 151 151 unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); 152 152 153 - if (!ioprio_valid(aprio)) 154 - return bprio; 155 - if (!ioprio_valid(bprio)) 156 - return aprio; 157 - 158 153 if (aclass == IOPRIO_CLASS_NONE) 159 154 aclass = IOPRIO_CLASS_BE; 160 155 if (bclass == IOPRIO_CLASS_NONE)
+3 -3
fs/splice.c
··· 607 607 ret = -ENOMEM; 608 608 page = page_cache_alloc_cold(mapping); 609 609 if (unlikely(!page)) 610 - goto out_nomem; 610 + goto out_ret; 611 611 612 612 /* 613 613 * This will also lock the page ··· 666 666 if (sd->pos + this_len > isize) 667 667 vmtruncate(mapping->host, isize); 668 668 669 - goto out; 669 + goto out_ret; 670 670 } 671 671 672 672 if (buf->page != page) { ··· 698 698 out: 699 699 page_cache_release(page); 700 700 unlock_page(page); 701 - out_nomem: 701 + out_ret: 702 702 return ret; 703 703 } 704 704
+1
include/linux/blkdev.h
··· 157 157 REQ_TYPE_ATA_CMD, 158 158 REQ_TYPE_ATA_TASK, 159 159 REQ_TYPE_ATA_TASKFILE, 160 + REQ_TYPE_ATA_PC, 160 161 }; 161 162 162 163 /*
-1
include/linux/elevator.h
··· 70 70 { 71 71 struct list_head list; 72 72 struct elevator_ops ops; 73 - struct elevator_type *elevator_type; 74 73 struct elv_fs_entry *elevator_attrs; 75 74 char elevator_name[ELV_NAME_MAX]; 76 75 struct module *elevator_owner;