projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ab6111
)
journal: use context_attach_window() in add_mmap() (#6339)
author
Vito Caputo
<vcaputo@pengaru.com>
Fri, 14 Jul 2017 17:24:46 +0000
(10:24 -0700)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 14 Jul 2017 17:24:46 +0000
(19:24 +0200)
Instead of context_detach_window() and a manual attach of the new
window, simply call context_attach_window() which performs the
detach first if appropriate.
src/journal/mmap-cache.c
patch
|
blob
|
history
diff --git
a/src/journal/mmap-cache.c
b/src/journal/mmap-cache.c
index
5dfda73
..
89f4a1d
100644
(file)
--- a/
src/journal/mmap-cache.c
+++ b/
src/journal/mmap-cache.c
@@
-503,9
+503,7
@@
static int add_mmap(
if (!w)
goto outofmem;
- context_detach_window(c);
- c->window = w;
- LIST_PREPEND(by_window, w->contexts, c);
+ context_attach_window(c, w);
*ret = (uint8_t*) w->ptr + (offset - w->offset);
return 1;