richardphibel / rpms / systemd

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