mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-09 23:34:57 -04:00
main: load_dir updates the node last layer
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
d99d8684c0
commit
cbf7881f01
8
main.c
8
main.c
@ -1149,7 +1149,10 @@ make_ovl_node (const char *path, struct ovl_layer *layer, const char *name, ino_
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (fstat (fd, &st) == 0)
|
if (fstat (fd, &st) == 0)
|
||||||
ret->ino = st.st_ino;
|
{
|
||||||
|
ret->ino = st.st_ino;
|
||||||
|
ret->last_layer = it;
|
||||||
|
}
|
||||||
|
|
||||||
s = safe_read_xattr (&val, fd, PRIVILEGED_ORIGIN_XATTR, PATH_MAX);
|
s = safe_read_xattr (&val, fd, PRIVILEGED_ORIGIN_XATTR, PATH_MAX);
|
||||||
if (s > 0)
|
if (s > 0)
|
||||||
@ -1322,6 +1325,7 @@ load_dir (struct ovl_data *lo, struct ovl_node *n, struct ovl_layer *layer, char
|
|||||||
child = hash_lookup (n->children, &key);
|
child = hash_lookup (n->children, &key);
|
||||||
if (child)
|
if (child)
|
||||||
{
|
{
|
||||||
|
child->last_layer = it;
|
||||||
if (child->whiteout && it == upper_layer)
|
if (child->whiteout && it == upper_layer)
|
||||||
{
|
{
|
||||||
hash_delete (n->children, child);
|
hash_delete (n->children, child);
|
||||||
@ -1386,13 +1390,13 @@ load_dir (struct ovl_data *lo, struct ovl_node *n, struct ovl_layer *layer, char
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
child = make_ovl_node (node_path, it, dent->d_name, 0, dirp, n, lo->fast_ino_check);
|
child = make_ovl_node (node_path, it, dent->d_name, 0, dirp, n, lo->fast_ino_check);
|
||||||
if (child == NULL)
|
if (child == NULL)
|
||||||
{
|
{
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
child->last_layer = it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user