diff options
| -rw-r--r-- | fs/btrfs/ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 8bfb514b26c9..1e766e86f334 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
| @@ -2185,6 +2185,11 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
| 2185 | if (!(src_file->f_mode & FMODE_READ)) | 2185 | if (!(src_file->f_mode & FMODE_READ)) |
| 2186 | goto out_fput; | 2186 | goto out_fput; |
| 2187 | 2187 | ||
| 2188 | /* don't make the dst file partly checksummed */ | ||
| 2189 | if ((BTRFS_I(src)->flags & BTRFS_INODE_NODATASUM) != | ||
| 2190 | (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) | ||
| 2191 | goto out_fput; | ||
| 2192 | |||
| 2188 | ret = -EISDIR; | 2193 | ret = -EISDIR; |
| 2189 | if (S_ISDIR(src->i_mode) || S_ISDIR(inode->i_mode)) | 2194 | if (S_ISDIR(src->i_mode) || S_ISDIR(inode->i_mode)) |
| 2190 | goto out_fput; | 2195 | goto out_fput; |
