mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 09:55:57 -04:00
fuse-overlayfs: check if it is a whiteout also when doing a lookup
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
dbf5732c75
commit
0d02ef15ce
8
main.c
8
main.c
@ -852,6 +852,8 @@ do_lookup_file (struct ovl_data *lo, fuse_ino_t parent, const char *name)
|
||||
|
||||
for (it = lo->layers; it; it = it->next)
|
||||
{
|
||||
const char *wh_name;
|
||||
|
||||
sprintf (path, "%s/%s", pnode->path, name);
|
||||
ret = TEMP_FAILURE_RETRY (fstatat (it->fd, path, &st, AT_SYMLINK_NOFOLLOW));
|
||||
if (ret < 0)
|
||||
@ -868,7 +870,11 @@ do_lookup_file (struct ovl_data *lo, fuse_ino_t parent, const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
node = make_ovl_node (path, it, name, 0, st.st_mode & S_IFDIR);
|
||||
wh_name = get_whiteout_name (name, &st);
|
||||
if (wh_name)
|
||||
node = make_whiteout_node (wh_name);
|
||||
else
|
||||
node = make_ovl_node (path, it, name, 0, st.st_mode & S_IFDIR);
|
||||
if (node == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user