Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57517
b: refs/heads/master
c: 620a324
h: refs/heads/master
i:
  57515: 6a76d7c
v: v3
  • Loading branch information
Jens Axboe committed Jun 8, 2007
1 parent 9c849ae commit 4d2ba57
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 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: 475ecade683566b19ebb84972de864039ac5fce3
refs/heads/master: 620a324b744a7d66c3c45a83042f8e7fc9fc5a04
46 changes: 23 additions & 23 deletions trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,37 +413,37 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,

break;
}
}
fill_it:
/*
* i_size must be checked after PageUptodate.
*/
isize = i_size_read(mapping->host);
end_index = (isize - 1) >> PAGE_CACHE_SHIFT;
if (unlikely(!isize || index > end_index))
break;

/*
* if this is the last page, see if we need to shrink
* the length and stop
*/
if (end_index == index) {
unsigned int plen;

/*
* i_size must be checked after ->readpage().
* max good bytes in this page
*/
isize = i_size_read(mapping->host);
end_index = (isize - 1) >> PAGE_CACHE_SHIFT;
if (unlikely(!isize || index > end_index))
plen = ((isize - 1) & ~PAGE_CACHE_MASK) + 1;
if (plen <= loff)
break;

/*
* if this is the last page, see if we need to shrink
* the length and stop
* force quit after adding this page
*/
if (end_index == index) {
unsigned int plen;

/*
* max good bytes in this page
*/
plen = ((isize - 1) & ~PAGE_CACHE_MASK) + 1;
if (plen <= loff)
break;

/*
* force quit after adding this page
*/
this_len = min(this_len, plen - loff);
len = this_len;
}
this_len = min(this_len, plen - loff);
len = this_len;
}
fill_it:

partial[page_nr].offset = loff;
partial[page_nr].len = this_len;
len -= this_len;
Expand Down

0 comments on commit 4d2ba57

Please sign in to comment.