mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-10 00:58:20 +03:00
fs-util: when opening arbitrary inodes, better use O_NONBLOCK
In case this is a device node where opening might block.
This commit is contained in:
parent
22a0a36efa
commit
1071c195f7
@ -1472,8 +1472,7 @@ int fsync_path_at(int at_fd, const char *path) {
|
||||
} else
|
||||
fd = at_fd;
|
||||
} else {
|
||||
|
||||
opened_fd = openat(at_fd, path, O_RDONLY|O_CLOEXEC);
|
||||
opened_fd = openat(at_fd, path, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
|
||||
if (opened_fd < 0)
|
||||
return -errno;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user