journal: use context_attach_window() in add_mmap() (#6339)
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.
This commit is contained in:
committed by
Lennart Poettering
parent
7ab6111fdb
commit
c7884da9e4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user