Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231548
b: refs/heads/master
c: 10c9376
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Dec 17, 2010
1 parent adeb011 commit 8dfbb0c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 47 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3c1e66f79f6a19951da10035c46faccc536ad59
refs/heads/master: 10c937604b9d7752fe2e4ef9125da3865a36b229
6 changes: 0 additions & 6 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2103,12 +2103,6 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
unsigned group_slice;
enum wl_prio_t original_prio = cfqd->serving_prio;

if (!cfqg) {
cfqd->serving_prio = IDLE_WORKLOAD;
cfqd->workload_expires = jiffies + 1;
return;
}

/* Choose next priority. RT > BE > IDLE */
if (cfq_group_busy_queues_wl(RT_WORKLOAD, cfqd, cfqg))
cfqd->serving_prio = RT_WORKLOAD;
Expand Down
4 changes: 2 additions & 2 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static struct blk_major_name {
} *major_names[BLKDEV_MAJOR_HASH_SIZE];

/* index in the above - for now: assume no multimajor ranges */
static inline int major_to_index(int major)
static inline int major_to_index(unsigned major)
{
return major % BLKDEV_MAJOR_HASH_SIZE;
}
Expand Down Expand Up @@ -828,7 +828,7 @@ static void *show_partition_start(struct seq_file *seqf, loff_t *pos)
static void *p;

p = disk_seqf_start(seqf, pos);
if (!IS_ERR(p) && p && !*pos)
if (!IS_ERR_OR_NULL(p) && !*pos)
seq_puts(seqf, "major minor #blocks name\n\n");
return p;
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,6 @@ lo_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
sector_t IV;
int size, ret;

ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

IV = ((sector_t) page->index << (PAGE_CACHE_SHIFT - 9)) +
(buf->offset >> 9);
size = sd->len;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/char_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static struct char_device_struct {
} *chrdevs[CHRDEV_MAJOR_HASH_SIZE];

/* index in the above */
static inline int major_to_index(int major)
static inline int major_to_index(unsigned major)
{
return major % CHRDEV_MAJOR_HASH_SIZE;
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,6 @@ nfsd_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
size_t size;
int ret;

ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

size = sd->len;

if (rqstp->rq_res.page_len == 0) {
Expand Down
43 changes: 14 additions & 29 deletions trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,19 +682,14 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,
{
struct file *file = sd->u.file;
loff_t pos = sd->pos;
int ret, more;

ret = buf->ops->confirm(pipe, buf);
if (!ret) {
more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
if (file->f_op && file->f_op->sendpage)
ret = file->f_op->sendpage(file, buf->page, buf->offset,
sd->len, &pos, more);
else
ret = -EINVAL;
}
int more;

return ret;
if (!likely(file->f_op && file->f_op->sendpage))
return -EINVAL;

more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
return file->f_op->sendpage(file, buf->page, buf->offset,
sd->len, &pos, more);
}

/*
Expand Down Expand Up @@ -727,13 +722,6 @@ int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
void *fsdata;
int ret;

/*
* make sure the data in this buffer is uptodate
*/
ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

offset = sd->pos & ~PAGE_CACHE_MASK;

this_len = sd->len;
Expand Down Expand Up @@ -805,12 +793,17 @@ int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_desc *sd,
if (sd->len > sd->total_len)
sd->len = sd->total_len;

ret = actor(pipe, buf, sd);
if (ret <= 0) {
ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret)) {
if (ret == -ENODATA)
ret = 0;
return ret;
}

ret = actor(pipe, buf, sd);
if (ret <= 0)
return ret;

buf->offset += ret;
buf->len -= ret;

Expand Down Expand Up @@ -1044,10 +1037,6 @@ static int write_pipe_buf(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
int ret;
void *data;

ret = buf->ops->confirm(pipe, buf);
if (ret)
return ret;

data = buf->ops->map(pipe, buf, 0);
ret = kernel_write(sd->u.file, data + buf->offset, sd->len, sd->pos);
buf->ops->unmap(pipe, buf, data);
Expand Down Expand Up @@ -1507,10 +1496,6 @@ static int pipe_to_user(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
char *src;
int ret;

ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
return ret;

/*
* See if we can use the atomic maps, by prefaulting in the
* pages and doing an atomic copy
Expand Down

0 comments on commit 8dfbb0c

Please sign in to comment.