Commit da79cbae authored by Linus Torvalds's avatar Linus Torvalds

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
parents 9ff4680e d58cdfb8
......@@ -93,21 +93,18 @@ static inline int elv_try_merge(struct request *__rq, struct bio *bio)
static struct elevator_type *elevator_find(const char *name)
{
struct elevator_type *e = NULL;
struct elevator_type *e;
struct list_head *entry;
list_for_each(entry, &elv_list) {
struct elevator_type *__e;
__e = list_entry(entry, struct elevator_type, list);
e = list_entry(entry, struct elevator_type, list);
if (!strcmp(__e->elevator_name, name)) {
e = __e;
break;
}
if (!strcmp(e->elevator_name, name))
return e;
}
return e;
return NULL;
}
static void elevator_put(struct elevator_type *e)
......@@ -1088,7 +1085,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
struct list_head *entry;
int len = 0;
spin_lock_irq(q->queue_lock);
spin_lock_irq(&elv_list_lock);
list_for_each(entry, &elv_list) {
struct elevator_type *__e;
......@@ -1098,7 +1095,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name)
else
len += sprintf(name+len, "%s ", __e->elevator_name);
}
spin_unlock_irq(q->queue_lock);
spin_unlock_irq(&elv_list_lock);
len += sprintf(len+name, "\n");
return len;
......
......@@ -597,7 +597,7 @@ static void cdrom_prepare_request(ide_drive_t *drive, struct request *rq)
struct cdrom_info *cd = drive->driver_data;
ide_init_drive_cmd(rq);
rq->cmd_type = REQ_TYPE_BLOCK_PC;
rq->cmd_type = REQ_TYPE_ATA_PC;
rq->rq_disk = cd->disk;
}
......@@ -2023,7 +2023,8 @@ ide_do_rw_cdrom (ide_drive_t *drive, struct request *rq, sector_t block)
}
info->last_block = block;
return action;
} else if (rq->cmd_type == REQ_TYPE_SENSE) {
} else if (rq->cmd_type == REQ_TYPE_SENSE ||
rq->cmd_type == REQ_TYPE_ATA_PC) {
return cdrom_do_packet_command(drive);
} else if (blk_pc_request(rq)) {
return cdrom_do_block_pc(drive, rq);
......
......@@ -150,11 +150,6 @@ int ioprio_best(unsigned short aprio, unsigned short bprio)
unsigned short aclass = IOPRIO_PRIO_CLASS(aprio);
unsigned short bclass = IOPRIO_PRIO_CLASS(bprio);
if (!ioprio_valid(aprio))
return bprio;
if (!ioprio_valid(bprio))
return aprio;
if (aclass == IOPRIO_CLASS_NONE)
aclass = IOPRIO_CLASS_BE;
if (bclass == IOPRIO_CLASS_NONE)
......
......@@ -607,7 +607,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
ret = -ENOMEM;
page = page_cache_alloc_cold(mapping);
if (unlikely(!page))
goto out_nomem;
goto out_ret;
/*
* This will also lock the page
......@@ -666,7 +666,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
if (sd->pos + this_len > isize)
vmtruncate(mapping->host, isize);
goto out;
goto out_ret;
}
if (buf->page != page) {
......@@ -698,7 +698,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
out:
page_cache_release(page);
unlock_page(page);
out_nomem:
out_ret:
return ret;
}
......
......@@ -157,6 +157,7 @@ enum rq_cmd_type_bits {
REQ_TYPE_ATA_CMD,
REQ_TYPE_ATA_TASK,
REQ_TYPE_ATA_TASKFILE,
REQ_TYPE_ATA_PC,
};
/*
......
......@@ -70,7 +70,6 @@ struct elevator_type
{
struct list_head list;
struct elevator_ops ops;
struct elevator_type *elevator_type;
struct elv_fs_entry *elevator_attrs;
char elevator_name[ELV_NAME_MAX];
struct module *elevator_owner;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment