Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98918
b: refs/heads/master
c: 32502b8
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Jens Axboe committed Jul 4, 2008
1 parent 7e0b8ae commit 26fa7e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 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: 8b3d3567f72aa61d5d6f4ce89d289b154e1ea866
refs/heads/master: 32502b8413a77b54b9e19809404109590c32dfb7
17 changes: 13 additions & 4 deletions trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,22 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
lock_page(page);

/*
* page was truncated, stop here. if this isn't the
* first page, we'll just complete what we already
* added
* Page was truncated, or invalidated by the
* filesystem. Redo the find/create, but this time the
* page is kept locked, so there's no chance of another
* race with truncate/invalidate.
*/
if (!page->mapping) {
unlock_page(page);
break;
page = find_or_create_page(mapping, index,
mapping_gfp_mask(mapping));

if (!page) {
error = -ENOMEM;
break;
}
page_cache_release(pages[page_nr]);
pages[page_nr] = page;
}
/*
* page was already under io and is now done, great
Expand Down

0 comments on commit 26fa7e4

Please sign in to comment.