summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2016-02-04 18:05:32 +0100
committerTom Gundersen <teg@jklm.no>2016-02-04 18:05:32 +0100
commit6448e16d2102ecf38e25a2721f9f877638f4cb93 (patch)
treee6778b9654fd569cf2ab773412e3b270a3c6c01a /src/journal
parent145c990fc90277f3a89475db33bcca2af091458f (diff)
parent06d127543513a9d4881c4e915053901b77ec4fe0 (diff)
Merge pull request #2524 from poettering/bag-of-stuff
Bag of stuff
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/mmap-cache.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c
index eb4b092e80..a69672ce21 100644
--- a/src/journal/mmap-cache.c
+++ b/src/journal/mmap-cache.c
@@ -40,9 +40,9 @@ typedef struct FileDescriptor FileDescriptor;
struct Window {
MMapCache *cache;
- bool invalidated;
- bool keep_always;
- bool in_unused;
+ bool invalidated:1;
+ bool keep_always:1;
+ bool in_unused:1;
int prot;
void *ptr;
@@ -78,7 +78,6 @@ struct MMapCache {
unsigned n_hit, n_missed;
-
Hashmap *fds;
Context *contexts[MMAP_CACHE_MAX_CONTEXTS];
@@ -408,7 +407,7 @@ static int try_context(
if (c->window->fd->sigbus)
return -EIO;
- c->window->keep_always |= keep_always;
+ c->window->keep_always = c->window->keep_always || keep_always;
*ret = (uint8_t*) c->window->ptr + (offset - c->window->offset);
return 1;
@@ -454,7 +453,7 @@ static int find_mmap(
return -ENOMEM;
context_attach_window(c, w);
- w->keep_always += keep_always;
+ w->keep_always = w->keep_always || keep_always;
*ret = (uint8_t*) w->ptr + (offset - w->offset);
return 1;