Commit 494ddd11 authored by majianpeng's avatar majianpeng Committed by Sage Weil

ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error.

Signed-off-by: default avatarJianpeng Ma <>
Reviewed-by: default avatarSage Weil <>
parent 8b8cf891
......@@ -196,8 +196,10 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg)
r = ceph_calc_file_object_mapping(&ci->i_layout, dl.file_offset, len,
&dl.object_no, &dl.object_offset,
if (r < 0)
if (r < 0) {
return -EIO;
dl.file_offset -= dl.object_offset;
dl.object_size = ceph_file_layout_object_size(ci->i_layout);
dl.block_size = ceph_file_layout_su(ci->i_layout);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment