daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
803fb7
From 530c665c059d3117c21b0dd6c1046accbf07208c Mon Sep 17 00:00:00 2001
803fb7
From: Michal Sekletar <msekleta@redhat.com>
803fb7
Date: Thu, 4 May 2017 16:53:30 +0200
803fb7
Subject: [PATCH] readahead-collect: don't print warning message when handling
803fb7
 symlink
803fb7
803fb7
Since we call open() with O_NOFOLLOW we can't really open symlinks (we
803fb7
would need to add O_PATH and we don't want that). Let's shortcut things
803fb7
and return immediately, but don't treat this as an error.
803fb7
803fb7
Resolves: #1387095
803fb7
---
803fb7
 src/readahead/readahead-collect.c | 3 +++
803fb7
 1 file changed, 3 insertions(+)
803fb7
803fb7
diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
803fb7
index 822a803a4..90f7f70bc 100644
803fb7
--- a/src/readahead/readahead-collect.c
803fb7
+++ b/src/readahead/readahead-collect.c
803fb7
@@ -106,6 +106,9 @@ static int pack_file(FILE *pack, const char *fn, bool on_btrfs) {
803fb7
                 if (errno == EPERM || errno == EACCES)
803fb7
                         return 0;
803fb7
 
803fb7
+                if (errno == ELOOP)
803fb7
+                        return 0;
803fb7
+
803fb7
                 log_warning("open(%s) failed: %m", fn);
803fb7
                 r = -errno;
803fb7
                 goto finish;