Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
427a2153
Commit
427a2153
authored
Jan 13, 2010
by
antirez
Browse files
access to already freed job structure fixed by statements reoredering
parent
85a27752
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
427a2153
...
...
@@ -7579,6 +7579,12 @@ static void vmCancelThreadedIOJob(robj *o) {
if
(
compareStringObjects
(
job
->
key
,
o
)
==
0
)
{
redisLog
(
REDIS_DEBUG
,
"*** CANCELED %p (%s)
\n
"
,
(
void
*
)
job
,
(
char
*
)
o
->
ptr
);
/* Mark the pages as free since the swap didn't happened
* or happened but is now discarded. */
if
(
job
->
type
==
REDIS_IOJOB_DO_SWAP
)
vmMarkPagesFree
(
job
->
page
,
job
->
pages
);
/* Cancel the job. It depends on the list the job is
* living in. */
switch
(
i
)
{
case
0
:
/* io_newjobs */
/* If the job was yet not processed the best thing to do
...
...
@@ -7591,10 +7597,6 @@ static void vmCancelThreadedIOJob(robj *o) {
job
->
canceled
=
1
;
break
;
}
/* Mark the pages as free since the swap didn't happened
* or happened but is not discarded. */
if
(
job
->
type
==
REDIS_IOJOB_DO_SWAP
)
vmMarkPagesFree
(
job
->
page
,
job
->
pages
);
/* Finally we have to adjust the storage type of the object
* in order to "UNDO" the operaiton. */
if
(
o
->
storage
==
REDIS_VM_LOADING
)
...
...
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