projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b8cf89
)
ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error.
author
majianpeng
<
[email protected]
>
Tue, 16 Jul 2013 11:36:21 +0000
(19:36 +0800)
committer
Sage Weil
<
[email protected]
>
Sat, 10 Aug 2013 00:49:39 +0000
(17:49 -0700)
CC:
[email protected]
Signed-off-by: Jianpeng Ma <
[email protected]
>
Reviewed-by: Sage Weil <
[email protected]
>
fs/ceph/ioctl.c
patch
|
blob
|
history
diff --git
a/fs/ceph/ioctl.c
b/fs/ceph/ioctl.c
index e0b4ef31d3c870c9e73fecad303e9f9957542385..a5ce62eb7806daf0722d1950f26015a11e67275c 100644
(file)
--- 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);