Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262253
b: refs/heads/master
c: 341d14f
h: refs/heads/master
i:
  262251: 30bd556
v: v3
  • Loading branch information
Mitch Harder authored and Chris Mason committed Aug 1, 2011
1 parent 6448aac commit 7343189
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: 69261c4b6a394ead1b5ca2966c908469355eb603
refs/heads/master: 341d14f161a475ebdbc9adff1f7e681e1185dee9
7 changes: 2 additions & 5 deletions trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ static int prepare_uptodate_page(struct page *page, u64 pos)
static noinline int prepare_pages(struct btrfs_root *root, struct file *file,
struct page **pages, size_t num_pages,
loff_t pos, unsigned long first_index,
unsigned long last_index, size_t write_bytes)
size_t write_bytes)
{
struct extent_state *cached_state = NULL;
int i;
Expand Down Expand Up @@ -1159,7 +1159,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
struct btrfs_root *root = BTRFS_I(inode)->root;
struct page **pages = NULL;
unsigned long first_index;
unsigned long last_index;
size_t num_written = 0;
int nrptrs;
int ret = 0;
Expand All @@ -1172,7 +1171,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
return -ENOMEM;

first_index = pos >> PAGE_CACHE_SHIFT;
last_index = (pos + iov_iter_count(i)) >> PAGE_CACHE_SHIFT;

while (iov_iter_count(i) > 0) {
size_t offset = pos & (PAGE_CACHE_SIZE - 1);
Expand Down Expand Up @@ -1206,8 +1204,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
* contents of pages from loop to loop
*/
ret = prepare_pages(root, file, pages, num_pages,
pos, first_index, last_index,
write_bytes);
pos, first_index, write_bytes);
if (ret) {
btrfs_delalloc_release_space(inode,
num_pages << PAGE_CACHE_SHIFT);
Expand Down

0 comments on commit 7343189

Please sign in to comment.