Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234090
b: refs/heads/master
c: 31339ac
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Mar 7, 2011
1 parent 6d6663b commit 0df76f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1bf862e9dad431175a1174379476299dbfdc017
refs/heads/master: 31339acd07b4ba687906702085127895a56eb920
13 changes: 13 additions & 0 deletions trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages,

/* Flush processor's dcache for this page */
flush_dcache_page(page);

/*
* if we get a partial write, we can end up with
* partially up to date pages. These add
* a lot of complexity, so make sure they don't
* happen by forcing this copy to be retried.
*
* The rest of the btrfs_file_write code will fall
* back to page at a time copies after we return 0.
*/
if (!PageUptodate(page) && copied < count)
copied = 0;

iov_iter_advance(i, copied);
write_bytes -= copied;
total_copied += copied;
Expand Down

0 comments on commit 0df76f5

Please sign in to comment.