mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
core: when a unit's SourcePath points to API VFS pretend we are never out-of-date (#5487)
If the unit's SourcePath is below /proc then it's a unit genreated from a kernel resource (such as a .mount or .swap unit). And those we watch anyway, and hence should never be out-of-date. Fixes: #5461
This commit is contained in:
parent
ecadd9b3fd
commit
77969722aa
@ -3154,6 +3154,11 @@ static bool fragment_mtime_newer(const char *path, usec_t mtime, bool path_maske
|
||||
if (!path)
|
||||
return false;
|
||||
|
||||
/* If the source is some virtual kernel file system, then we assume we watch it anyway, and hence pretend we
|
||||
* are never out-of-date. */
|
||||
if (PATH_STARTSWITH_SET(path, "/proc", "/sys"))
|
||||
return false;
|
||||
|
||||
if (stat(path, &st) < 0)
|
||||
/* What, cannot access this anymore? */
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user