diff options
author | majianpeng <majianpeng@gmail.com> | 2013-07-16 15:36:21 +0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-10 04:49:39 +0400 |
commit | 494ddd11be3e2621096bb425eed2886f8e8446d4 (patch) | |
tree | 5864a4be34d680b914cdfac5a3348728e5d8f9a0 /fs | |
parent | 8b8cf8917f9b5d74e04f281272d8719ce335a497 (diff) | |
download | linux-494ddd11be3e2621096bb425eed2886f8e8446d4.tar.xz |
ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error.
CC: stable@vger.kernel.org
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/ioctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c index e0b4ef31d3c8..a5ce62eb7806 100644 --- a/fs/ceph/ioctl.c +++ b/fs/ceph/ioctl.c @@ -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); |