Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
93c20d98
Commit
93c20d98
authored
Dec 15, 2009
by
Yehuda Sadeh
Committed by
Sage Weil
Dec 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: fix msgpool reservation leak
Signed-off-by:
Yehuda Sadeh
<
yehuda@hq.newdream.net
>
parent
b3d1dbbd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
fs/ceph/osd_client.c
fs/ceph/osd_client.c
+4
-1
fs/ceph/osd_client.h
fs/ceph/osd_client.h
+1
-0
No files found.
fs/ceph/osd_client.c
View file @
93c20d98
...
@@ -145,6 +145,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
...
@@ -145,6 +145,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
ceph_osdc_put_request
(
req
);
ceph_osdc_put_request
(
req
);
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
}
}
req
->
r_num_prealloc_reply
=
num_reply
;
req
->
r_osdc
=
osdc
;
req
->
r_osdc
=
osdc
;
req
->
r_mempool
=
use_mempool
;
req
->
r_mempool
=
use_mempool
;
...
@@ -165,7 +166,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
...
@@ -165,7 +166,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
else
else
msg
=
ceph_msg_new
(
CEPH_MSG_OSD_OP
,
msg_size
,
0
,
0
,
NULL
);
msg
=
ceph_msg_new
(
CEPH_MSG_OSD_OP
,
msg_size
,
0
,
0
,
NULL
);
if
(
IS_ERR
(
msg
))
{
if
(
IS_ERR
(
msg
))
{
ceph_msgpool_resv
(
&
osdc
->
msgpool_op_reply
,
num_reply
);
ceph_msgpool_resv
(
&
osdc
->
msgpool_op_reply
,
-
num_reply
);
ceph_osdc_put_request
(
req
);
ceph_osdc_put_request
(
req
);
return
ERR_PTR
(
PTR_ERR
(
msg
));
return
ERR_PTR
(
PTR_ERR
(
msg
));
}
}
...
@@ -465,6 +466,8 @@ static void __unregister_request(struct ceph_osd_client *osdc,
...
@@ -465,6 +466,8 @@ static void __unregister_request(struct ceph_osd_client *osdc,
rb_erase
(
&
req
->
r_node
,
&
osdc
->
requests
);
rb_erase
(
&
req
->
r_node
,
&
osdc
->
requests
);
osdc
->
num_requests
--
;
osdc
->
num_requests
--
;
ceph_msgpool_resv
(
&
osdc
->
msgpool_op_reply
,
-
req
->
r_num_prealloc_reply
);
if
(
req
->
r_osd
)
{
if
(
req
->
r_osd
)
{
/* make sure the original request isn't in flight. */
/* make sure the original request isn't in flight. */
ceph_con_revoke
(
&
req
->
r_osd
->
o_con
,
req
->
r_request
);
ceph_con_revoke
(
&
req
->
r_osd
->
o_con
,
req
->
r_request
);
...
...
fs/ceph/osd_client.h
View file @
93c20d98
...
@@ -48,6 +48,7 @@ struct ceph_osd_request {
...
@@ -48,6 +48,7 @@ struct ceph_osd_request {
int
r_flags
;
/* any additional flags for the osd */
int
r_flags
;
/* any additional flags for the osd */
u32
r_sent
;
/* >0 if r_request is sending/sent */
u32
r_sent
;
/* >0 if r_request is sending/sent */
int
r_prepared_pages
,
r_got_reply
;
int
r_prepared_pages
,
r_got_reply
;
int
r_num_prealloc_reply
;
struct
ceph_osd_client
*
r_osdc
;
struct
ceph_osd_client
*
r_osdc
;
struct
kref
r_kref
;
struct
kref
r_kref
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment