summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-15 20:56:55 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-15 20:56:55 +0200
commit5470c03b37d8421a903564c2c8028c8b8d67d403 (patch)
tree7cbde67daab5e60978e8af60f988771360546575 /src/journal
parent7693146dee53a2b0f524e977188347166bf454ca (diff)
downloadsystemd-5470c03b37d8421a903564c2c8028c8b8d67d403.tar.gz
coredump: make sure we vacuum by default
Only if both keep_free and max_use are actually 0 we can shortcut things and avoid vacuuming. If either are positive or -1 we need to execute the vacuuming. http://lists.freedesktop.org/archives/systemd-devel/2015-April/031382.html
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/coredump-vacuum.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/journal/coredump-vacuum.c b/src/journal/coredump-vacuum.c
index 9b73795e5b..c0347ef569 100644
--- a/src/journal/coredump-vacuum.c
+++ b/src/journal/coredump-vacuum.c
@@ -103,8 +103,7 @@ static bool vacuum_necessary(int fd, off_t sum, off_t keep_free, off_t max_use)
if (max_use < DEFAULT_MAX_USE_LOWER)
max_use = DEFAULT_MAX_USE_LOWER;
- }
- else
+ } else
max_use = DEFAULT_MAX_USE_LOWER;
} else
max_use = PAGE_ALIGN(max_use);
@@ -135,7 +134,7 @@ int coredump_vacuum(int exclude_fd, off_t keep_free, off_t max_use) {
struct stat exclude_st;
int r;
- if (keep_free <= 0 && max_use <= 0)
+ if (keep_free == 0 && max_use == 0)
return 0;
if (exclude_fd >= 0) {