diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2009-10-29 18:02:33 +0000 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-10-30 12:39:04 +0100 |
commit | 88fbff03df6be4f0f71df11047d4a31daed357e4 (patch) | |
tree | 44811c91c5fc5ea3703c03a0a7c33696f36ab9e7 /libudev/libudev-queue-private.c | |
parent | 26347a4c5538008318188118872490128f43fcd3 (diff) |
udevd: queue-export - remove retry loop
These retry loops are required where create_path() could race with
delete_path(). But only the main udevd process writes to the queue,
so no races will happen here.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Diffstat (limited to 'libudev/libudev-queue-private.c')
-rw-r--r-- | libudev/libudev-queue-private.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c index 37de67a3d4..6109837f7e 100644 --- a/libudev/libudev-queue-private.c +++ b/libudev/libudev-queue-private.c @@ -396,7 +396,6 @@ static void update_failed(struct udev_queue_export *udev_queue_export, { struct udev *udev = udev_device_get_udev(udev_device); char filename[UTIL_PATH_SIZE]; - int err; if (state != DEVICE_FAILED && udev_queue_export->failed_count == 0) return; @@ -409,16 +408,10 @@ static void update_failed(struct udev_queue_export *udev_queue_export, case DEVICE_FAILED: /* record event in the failed directory */ udev_queue_export->failed_count++; - do { - err = util_create_path(udev, filename); - if (err != 0 && err != -ENOENT) - break; - udev_selinux_setfscreatecon(udev, filename, S_IFLNK); - err = symlink(udev_device_get_devpath(udev_device), filename); - if (err != 0) - err = -errno; - udev_selinux_resetfscreatecon(udev); - } while (err == -ENOENT); + util_create_path(udev, filename); + udev_selinux_setfscreatecon(udev, filename, S_IFLNK); + symlink(udev_device_get_devpath(udev_device), filename); + udev_selinux_resetfscreatecon(udev); break; case DEVICE_QUEUED: |