fuse-overlayfs: not override the ret from fstatat

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2019-04-27 00:19:17 +02:00
parent eee6a48738
commit 064452bfba
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED

8
main.c
View File

@ -1130,14 +1130,14 @@ load_dir (struct ovl_data *lo, struct ovl_node *n, struct ovl_layer *layer, char
if (ret < 0)
return NULL;
ret = TEMP_FAILURE_RETRY (fstatat (fd, whiteout_path, &tmp_st, AT_SYMLINK_NOFOLLOW));
if (ret < 0 && errno != ENOENT)
return NULL;
ret = asprintf (&node_path, "%s/%s", n->path, dent->d_name);
if (ret < 0)
return NULL;
ret = TEMP_FAILURE_RETRY (fstatat (fd, whiteout_path, &tmp_st, AT_SYMLINK_NOFOLLOW));
if (ret < 0 && errno != ENOENT)
return NULL;
if (ret == 0)
{
child = make_whiteout_node (node_path, dent->d_name);