dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From 530c665c059d3117c21b0dd6c1046accbf07208c Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Thu, 4 May 2017 16:53:30 +0200
Subject: [PATCH] readahead-collect: don't print warning message when handling
 symlink

Since we call open() with O_NOFOLLOW we can't really open symlinks (we
would need to add O_PATH and we don't want that). Let's shortcut things
and return immediately, but don't treat this as an error.

Resolves: #1387095
---
 src/readahead/readahead-collect.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
index 822a803a41..90f7f70bce 100644
--- a/src/readahead/readahead-collect.c
+++ b/src/readahead/readahead-collect.c
@@ -106,6 +106,9 @@ static int pack_file(FILE *pack, const char *fn, bool on_btrfs) {
                 if (errno == EPERM || errno == EACCES)
                         return 0;
 
+                if (errno == ELOOP)
+                        return 0;
+
                 log_warning("open(%s) failed: %m", fn);
                 r = -errno;
                 goto finish;