Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Oct 12, 2006
2 parents 9ff4680 + d58cdfb commit da79cba
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 21 deletions.
17 changes: 7 additions & 10 deletions block/elevator.c
Expand Up @@ -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)
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions drivers/ide/ide-cd.c
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions fs/ioprio.c
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions fs/splice.c
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions include/linux/blkdev.h
Expand Up @@ -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,
};

/*
Expand Down
1 change: 0 additions & 1 deletion include/linux/elevator.h
Expand Up @@ -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;
Expand Down

0 comments on commit da79cba

Please sign in to comment.