diff options
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9a780c8d0ac8..cdbb054102b9 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -830,6 +830,7 @@ out_up_write: | |||
830 | out_unlock: | 830 | out_unlock: |
831 | mutex_unlock(&inode->i_mutex); | 831 | mutex_unlock(&inode->i_mutex); |
832 | if (!err) { | 832 | if (!err) { |
833 | shrink_dcache_sb(root->fs_info->sb); | ||
833 | btrfs_invalidate_inodes(dest); | 834 | btrfs_invalidate_inodes(dest); |
834 | d_delete(dentry); | 835 | d_delete(dentry); |
835 | } | 836 | } |
@@ -1122,8 +1123,10 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
1122 | datao += off - key.offset; | 1123 | datao += off - key.offset; |
1123 | datal -= off - key.offset; | 1124 | datal -= off - key.offset; |
1124 | } | 1125 | } |
1125 | if (key.offset + datao + datal > off + len) | 1126 | |
1126 | datal = off + len - key.offset - datao; | 1127 | if (key.offset + datal > off + len) |
1128 | datal = off + len - key.offset; | ||
1129 | |||
1127 | /* disko == 0 means it's a hole */ | 1130 | /* disko == 0 means it's a hole */ |
1128 | if (!disko) | 1131 | if (!disko) |
1129 | datao = 0; | 1132 | datao = 0; |