[ 3.8.y.z extended stable ] Patch "ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error." has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Sep 19 00:03:21 UTC 2013
This is a note to let you know that I have just added a patch titled
ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error.
to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
This patch is scheduled to be released in version 3.8.13.10.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From b01362dc03e5ca8558229e624e0ed46d607cfc5f Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng at gmail.com>
Date: Tue, 16 Jul 2013 19:36:21 +0800
Subject: ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error.
commit 494ddd11be3e2621096bb425eed2886f8e8446d4 upstream.
Signed-off-by: Jianpeng Ma <majianpeng at gmail.com>
Reviewed-by: Sage Weil <sage at inktank.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
fs/ceph/ioctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
index 36549a4..c171111 100644
--- a/fs/ceph/ioctl.c
+++ b/fs/ceph/ioctl.c
@@ -197,8 +197,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);
--
1.8.1.2
More information about the kernel-team
mailing list