mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-09 15:24:54 -04:00
main: skip RENAME_WHITEOUT if we cannot use mknod
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
a4ebbc8361
commit
c99226b70b
4
main.c
4
main.c
@ -766,8 +766,8 @@ hide_node (struct ovl_data *lo, struct ovl_node *node, bool unlink_src)
|
||||
if (unlink_src)
|
||||
{
|
||||
/* If the atomic rename+mknod failed, then fallback into doing it in two steps. */
|
||||
if (syscall (SYS_renameat2, node_dirfd (node), node->path, lo->workdir_fd,
|
||||
newpath, RENAME_WHITEOUT) < 0)
|
||||
if (!can_mknod || syscall (SYS_renameat2, node_dirfd (node), node->path, lo->workdir_fd,
|
||||
newpath, RENAME_WHITEOUT) < 0)
|
||||
{
|
||||
if (node->parent)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user