mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-16 10:51:37 -04:00
main: do not open twice the same file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
a468981104
commit
6c74e33cca
4
main.c
4
main.c
@ -949,10 +949,6 @@ make_ovl_node (const char *path, struct ovl_layer *layer, const char *name, ino_
|
|||||||
if (fstat (fd, &st) == 0)
|
if (fstat (fd, &st) == 0)
|
||||||
ret->ino = st.st_ino;
|
ret->ino = st.st_ino;
|
||||||
|
|
||||||
close (fd);
|
|
||||||
fd = TEMP_FAILURE_RETRY (openat (it->fd, path, O_RDONLY|O_NONBLOCK|O_NOFOLLOW));
|
|
||||||
if (fd < 0)
|
|
||||||
continue;
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user