Blame SOURCES/0489-readahead-collect-don-t-print-warning-message-when-h.patch

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