From 064452bfba14fafcc1a61b777b4f57247c71d775 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sat, 27 Apr 2019 00:19:17 +0200 Subject: [PATCH] fuse-overlayfs: not override the ret from fstatat Signed-off-by: Giuseppe Scrivano --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 60193c4..3b8e00e 100644 --- a/main.c +++ b/main.c @@ -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);