mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-10 07:44:54 -04:00
main, copyup: avoid a chown if it is not needed
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
74fa25112a
commit
0749dd7fb8
3
main.c
3
main.c
@ -2383,9 +2383,12 @@ copyup (struct ovl_data *lo, struct ovl_node *node)
|
|||||||
if (dfd < 0)
|
if (dfd < 0)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
if (st.st_uid != lo->uid || st.st_gid != lo->gid)
|
||||||
|
{
|
||||||
ret = fchown (dfd, st.st_uid, st.st_gid);
|
ret = fchown (dfd, st.st_uid, st.st_gid);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
buf = malloc (buf_size);
|
buf = malloc (buf_size);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user