mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error.
commit 494ddd11be upstream.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fd5e2dea53
commit
4f8e2fc10e
@@ -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,
|
||||
&olen);
|
||||
if (r < 0)
|
||||
if (r < 0) {
|
||||
up_read(&osdc->map_sem);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user