summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-09-02 06:58:59 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-09-02 09:06:24 +0900
commit8f27311eb2aec2411d1fb7d62e6c9d75d21ae8df (patch)
tree2388ad27398a29ef6c928904998294270acd8d9a /src/udev
parent6df797f75fa08bb1a9e657001229bd47903e6174 (diff)
downloadsystemd-8f27311eb2aec2411d1fb7d62e6c9d75d21ae8df.tar.gz
udev-node: assume no new claim to a symlink if /run/udev/links is not updated
During creating a symlink to a device node, if another device node which requests the same symlink is added/removed, `stat_inode_unmodified()` should always detects that. We do not need to continue the loop unconditionally.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-node.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c
index 0de848da19..1a34ea8128 100644
--- a/src/udev/udev-node.c
+++ b/src/udev/udev-node.c
@@ -491,11 +491,6 @@ static int link_update(sd_device *dev, const char *slink_in, bool add) {
r = node_symlink(dev, target, slink);
if (r < 0)
return r;
- if (r == 1)
- /* We have replaced already existing symlink, possibly there is some other device trying
- * to claim the same symlink. Let's do one more iteration to give us a chance to fix
- * the error if other device actually claims the symlink with higher priority. */
- continue;
/* Skip the second stat() if the first failed, stat_inode_unmodified() would return false regardless. */
if ((st1.st_mode & S_IFMT) != 0) {