Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201031
b: refs/heads/master
c: f5e27b6
h: refs/heads/master
i:
  201029: 65c3fae
  201027: cc4f2b0
  201023: 633499c
v: v3
  • Loading branch information
Tao Ma authored and Joel Becker committed Jul 15, 2010
1 parent dd73057 commit 9c2b967
Show file tree
Hide file tree
Showing 2 changed files with 7 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: e372357ba55ae89307af15cd680467d8f0db4f01
refs/heads/master: f5e27b6ddfbafdd9c9c2f06bbf28af12581409bc
6 changes: 6 additions & 0 deletions trunk/fs/ocfs2/refcounttree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2931,6 +2931,12 @@ static int ocfs2_duplicate_clusters_by_page(handle_t *handle,

offset = ((loff_t)cpos) << OCFS2_SB(sb)->s_clustersize_bits;
end = offset + (new_len << OCFS2_SB(sb)->s_clustersize_bits);
/*
* We only duplicate pages until we reach the page contains i_size - 1.
* So trim 'end' to i_size.
*/
if (end > i_size_read(context->inode))
end = i_size_read(context->inode);

while (offset < end) {
page_index = offset >> PAGE_CACHE_SHIFT;
Expand Down

0 comments on commit 9c2b967

Please sign in to comment.