diff --git a/fs/ceph/file.c b/fs/ceph/file.c index a9d4e4492420..a0c54058c634 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -2523,6 +2523,10 @@ static ssize_t __ceph_copy_file_range(struct file *src_file, loff_t src_off, return -EOPNOTSUPP; } + /* Every encrypted inode gets its own key, so we can't offload them */ + if (IS_ENCRYPTED(src_inode) || IS_ENCRYPTED(dst_inode)) + return -EOPNOTSUPP; + if (len < src_ci->i_layout.object_size) return -EOPNOTSUPP; /* no remote copy will be done */