Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
79422fd9
Unverified
Commit
79422fd9
authored
Jan 19, 2024
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_cache: use buddy_returns in fellow_cache_obj_get
parent
8a3f2a50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
fellow_cache.c
src/fellow_cache.c
+7
-3
No files found.
src/fellow_cache.c
View file @
79422fd9
...
...
@@ -5389,6 +5389,8 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
CHECK_OBJ_NOTNULL
(
fc
,
FELLOW_CACHE_MAGIC
);
fdba
.
fdb
=
priv2
;
struct
buddy_returns
*
rets
=
BUDDY_RETURNS_STK
(
fc
->
membuddy
,
2
);
/*
* init a new object, then insert it atomically
*
...
...
@@ -5539,7 +5541,7 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
memcpy
(
ptr
,
fdo
,
sz
);
fdo
=
fcs
->
u
.
fco_fdo
=
(
void
*
)
ptr
;
buddy_return1_ptr_extent
(
fc
->
membuddy
,
&
fcs
->
alloc
);
AN
(
buddy_return_ptr_extent
(
rets
,
&
fcs
->
alloc
)
);
}
else
fdo
=
fellow_disk_obj_trim
(
fc
,
fcs
);
...
...
@@ -5583,8 +5585,9 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
AZ
(
pthread_mutex_unlock
(
&
fco
->
mtx
));
if
(
dowry
.
bits
)
buddy_return1_ptr_page
(
fc
->
membuddy
,
&
dowry
);
AN
(
buddy_return_ptr_page
(
rets
,
&
dowry
)
);
fellow_cache_obj_trim
(
fc
,
fco
);
buddy_return
(
rets
);
return
(
FCR_OK
(
fco
));
err:
if
(
ocp
)
{
...
...
@@ -5600,12 +5603,13 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
fellow_cache_obj_deref
(
fc
,
fco
);
if
(
fcsl_mem
.
ptr
)
buddy_return1_ptr_extent
(
fc
->
membuddy
,
&
fcsl_mem
);
AN
(
buddy_return_ptr_extent
(
rets
,
&
fcsl_mem
)
);
if
(
strstr
(
err
,
"alloc"
))
fcr
=
FCR_ALLOCERR
(
err
);
else
fcr
=
FCR_IOERR
(
err
);
fellow_cache_res_check
(
fc
,
fcr
);
buddy_return
(
rets
);
return
(
fcr
);
}
...
...
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