Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233002
b: refs/heads/master
c: 7adf5df
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Jan 28, 2011
1 parent e59597f commit 153a4ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: ad0397a7a97f55fd7f70998ec208c5d8b90310ff
refs/heads/master: 7adf5dfbb3af65a00e20b3ead224c3a1b40e4ec4
8 changes: 6 additions & 2 deletions trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,12 @@ static noinline int prepare_pages(struct btrfs_root *root, struct file *file,
for (i = 0; i < num_pages; i++) {
pages[i] = grab_cache_page(inode->i_mapping, index + i);
if (!pages[i]) {
err = -ENOMEM;
BUG_ON(1);
int c;
for (c = i - 1; c >= 0; c--) {
unlock_page(pages[c]);
page_cache_release(pages[c]);
}
return -ENOMEM;
}
wait_on_page_writeback(pages[i]);
}
Expand Down

0 comments on commit 153a4ec

Please sign in to comment.