Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263978
b: refs/heads/master
c: 71ef078
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and Chris Mason committed Sep 18, 2011
1 parent 437d1dc commit 4665f50
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 3765fefaee2da83f10829fa64a74e6b7360350cb
refs/heads/master: 71ef07861080418d125dcf454af41baafa409a2c
8 changes: 4 additions & 4 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2234,6 +2234,10 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
goto out_unlock;
}

/* truncate page cache pages from target inode range */
truncate_inode_pages_range(&inode->i_data, destoff,
PAGE_CACHE_ALIGN(destoff + len) - 1);

/* do any pending delalloc/csum calc on src, one way or
another, and lock file content */
while (1) {
Expand All @@ -2250,10 +2254,6 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
btrfs_wait_ordered_range(src, off, len);
}

/* truncate page cache pages from target inode range */
truncate_inode_pages_range(&inode->i_data, off,
ALIGN(off + len, PAGE_CACHE_SIZE) - 1);

/* clone data */
key.objectid = btrfs_ino(src);
key.type = BTRFS_EXTENT_DATA_KEY;
Expand Down

0 comments on commit 4665f50

Please sign in to comment.