diff options
-rw-r--r-- | block/elevator.c | 17 | ||||
-rw-r--r-- | drivers/ide/ide-cd.c | 5 | ||||
-rw-r--r-- | fs/ioprio.c | 5 | ||||
-rw-r--r-- | fs/splice.c | 6 | ||||
-rw-r--r-- | include/linux/blkdev.h | 1 | ||||
-rw-r--r-- | include/linux/elevator.h | 1 |
6 files changed, 14 insertions, 21 deletions
diff --git a/block/elevator.c b/block/elevator.c index 487dd3da8853..8ccd163254b8 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -93,21 +93,18 @@ static inline int elv_try_merge(struct request *__rq, struct bio *bio) | |||
93 | 93 | ||
94 | static struct elevator_type *elevator_find(const char *name) | 94 | static struct elevator_type *elevator_find(const char *name) |
95 | { | 95 | { |
96 | struct elevator_type *e = NULL; | 96 | struct elevator_type *e; |
97 | struct list_head *entry; | 97 | struct list_head *entry; |
98 | 98 | ||
99 | list_for_each(entry, &elv_list) { | 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)) { | 103 | if (!strcmp(e->elevator_name, name)) |
105 | e = __e; | 104 | return e; |
106 | break; | ||
107 | } | ||
108 | } | 105 | } |
109 | 106 | ||
110 | return e; | 107 | return NULL; |
111 | } | 108 | } |
112 | 109 | ||
113 | static void elevator_put(struct elevator_type *e) | 110 | static void elevator_put(struct elevator_type *e) |
@@ -1088,7 +1085,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) | |||
1088 | struct list_head *entry; | 1085 | struct list_head *entry; |
1089 | int len = 0; | 1086 | int len = 0; |
1090 | 1087 | ||
1091 | spin_lock_irq(q->queue_lock); | 1088 | spin_lock_irq(&elv_list_lock); |
1092 | list_for_each(entry, &elv_list) { | 1089 | list_for_each(entry, &elv_list) { |
1093 | struct elevator_type *__e; | 1090 | struct elevator_type *__e; |
1094 | 1091 | ||
@@ -1098,7 +1095,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) | |||
1098 | else | 1095 | else |
1099 | len += sprintf(name+len, "%s ", __e->elevator_name); | 1096 | len += sprintf(name+len, "%s ", __e->elevator_name); |
1100 | } | 1097 | } |
1101 | spin_unlock_irq(q->queue_lock); | 1098 | spin_unlock_irq(&elv_list_lock); |
1102 | 1099 | ||
1103 | len += sprintf(len+name, "\n"); | 1100 | len += sprintf(len+name, "\n"); |
1104 | return len; | 1101 | return len; |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 69bbb6206a00..e7513e55ace8 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -597,7 +597,7 @@ static void cdrom_prepare_request(ide_drive_t *drive, struct request *rq) | |||
597 | struct cdrom_info *cd = drive->driver_data; | 597 | struct cdrom_info *cd = drive->driver_data; |
598 | 598 | ||
599 | ide_init_drive_cmd(rq); | 599 | ide_init_drive_cmd(rq); |
600 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 600 | rq->cmd_type = REQ_TYPE_ATA_PC; |
601 | rq->rq_disk = cd->disk; | 601 | rq->rq_disk = cd->disk; |
602 | } | 602 | } |
603 | 603 | ||
@@ -2023,7 +2023,8 @@ ide_do_rw_cdrom (ide_drive_t *drive, struct request *rq, sector_t block) | |||
2023 | } | 2023 | } |
2024 | info->last_block = block; | 2024 | info->last_block = block; |
2025 | return action; | 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 | return cdrom_do_packet_command(drive); | 2028 | return cdrom_do_packet_command(drive); |
2028 | } else if (blk_pc_request(rq)) { | 2029 | } else if (blk_pc_request(rq)) { |
2029 | return cdrom_do_block_pc(drive, rq); | 2030 | return cdrom_do_block_pc(drive, rq); |
diff --git a/fs/ioprio.c b/fs/ioprio.c index 6dc6721d9e82..89e8da112a75 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c | |||
@@ -150,11 +150,6 @@ int ioprio_best(unsigned short aprio, unsigned short bprio) | |||
150 | unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); | 150 | unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); |
151 | unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); | 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 | if (aclass == IOPRIO_CLASS_NONE) | 153 | if (aclass == IOPRIO_CLASS_NONE) |
159 | aclass = IOPRIO_CLASS_BE; | 154 | aclass = IOPRIO_CLASS_BE; |
160 | if (bclass == IOPRIO_CLASS_NONE) | 155 | if (bclass == IOPRIO_CLASS_NONE) |
diff --git a/fs/splice.c b/fs/splice.c index 13e92dd19fbb..a567010b62ac 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -607,7 +607,7 @@ find_page: | |||
607 | ret = -ENOMEM; | 607 | ret = -ENOMEM; |
608 | page = page_cache_alloc_cold(mapping); | 608 | page = page_cache_alloc_cold(mapping); |
609 | if (unlikely(!page)) | 609 | if (unlikely(!page)) |
610 | goto out_nomem; | 610 | goto out_ret; |
611 | 611 | ||
612 | /* | 612 | /* |
613 | * This will also lock the page | 613 | * This will also lock the page |
@@ -666,7 +666,7 @@ find_page: | |||
666 | if (sd->pos + this_len > isize) | 666 | if (sd->pos + this_len > isize) |
667 | vmtruncate(mapping->host, isize); | 667 | vmtruncate(mapping->host, isize); |
668 | 668 | ||
669 | goto out; | 669 | goto out_ret; |
670 | } | 670 | } |
671 | 671 | ||
672 | if (buf->page != page) { | 672 | if (buf->page != page) { |
@@ -698,7 +698,7 @@ find_page: | |||
698 | out: | 698 | out: |
699 | page_cache_release(page); | 699 | page_cache_release(page); |
700 | unlock_page(page); | 700 | unlock_page(page); |
701 | out_nomem: | 701 | out_ret: |
702 | return ret; | 702 | return ret; |
703 | } | 703 | } |
704 | 704 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 26f7856ff812..d370d2cfe138 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -157,6 +157,7 @@ enum rq_cmd_type_bits { | |||
157 | REQ_TYPE_ATA_CMD, | 157 | REQ_TYPE_ATA_CMD, |
158 | REQ_TYPE_ATA_TASK, | 158 | REQ_TYPE_ATA_TASK, |
159 | REQ_TYPE_ATA_TASKFILE, | 159 | REQ_TYPE_ATA_TASKFILE, |
160 | REQ_TYPE_ATA_PC, | ||
160 | }; | 161 | }; |
161 | 162 | ||
162 | /* | 163 | /* |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index b3370ef5164d..2fa9f1144228 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -70,7 +70,6 @@ struct elevator_type | |||
70 | { | 70 | { |
71 | struct list_head list; | 71 | struct list_head list; |
72 | struct elevator_ops ops; | 72 | struct elevator_ops ops; |
73 | struct elevator_type *elevator_type; | ||
74 | struct elv_fs_entry *elevator_attrs; | 73 | struct elv_fs_entry *elevator_attrs; |
75 | char elevator_name[ELV_NAME_MAX]; | 74 | char elevator_name[ELV_NAME_MAX]; |
76 | struct module *elevator_owner; | 75 | struct module *elevator_owner; |