X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Freadahead-collect.c;h=20881b3944673c4fb33b9a2ec6a34492d5e8fe43;hp=693729598e4102dd1c7a8ef3d1341b8f7d6b1b39;hb=f782b8d031fcf6ec6b6ea4a1e0c956e44a7c7298;hpb=37f85e66e8f396b6f758e063531b95531aef628e diff --git a/src/readahead-collect.c b/src/readahead-collect.c index 693729598..20881b394 100644 --- a/src/readahead-collect.c +++ b/src/readahead-collect.c @@ -290,13 +290,13 @@ static int collect(const char *root) { log_debug("Collecting..."); - if (access("/dev/.run/systemd/readahead/cancel", F_OK) >= 0) { + if (access("/run/systemd/readahead/cancel", F_OK) >= 0) { log_debug("Collection canceled"); r = -ECANCELED; goto finish; } - if (access("/dev/.run/systemd/readahead/done", F_OK) >= 0) { + if (access("/run/systemd/readahead/done", F_OK) >= 0) { log_debug("Got termination request"); goto done; } @@ -383,6 +383,16 @@ static int collect(const char *root) { if (errno == EINTR || errno == EAGAIN) continue; + /* fanotify sometimes returns EACCES on read() + * where it shouldn't. For now let's just + * ignore it here (which is safe), but + * eventually this should be + * dropped when the kernel is fixed. + * + * https://bugzilla.redhat.com/show_bug.cgi?id=707577 */ + if (errno == EACCES) + continue; + log_error("Failed to read event: %m"); r = -errno; goto finish;