mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-09 15:24: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
9
main.c
9
main.c
@ -2383,9 +2383,12 @@ copyup (struct ovl_data *lo, struct ovl_node *node)
|
||||
if (dfd < 0)
|
||||
goto exit;
|
||||
|
||||
ret = fchown (dfd, st.st_uid, st.st_gid);
|
||||
if (ret < 0)
|
||||
goto exit;
|
||||
if (st.st_uid != lo->uid || st.st_gid != lo->gid)
|
||||
{
|
||||
ret = fchown (dfd, st.st_uid, st.st_gid);
|
||||
if (ret < 0)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
buf = malloc (buf_size);
|
||||
if (buf == NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user