diff --git a/libglnx b/libglnx index 381ca54e..371172bc 160000 --- a/libglnx +++ b/libglnx @@ -1 +1 @@ -Subproject commit 381ca54ee3a47de291d26a5db8772732fb4a9d59 +Subproject commit 371172bcfd869867cf1c2847fcbbb3aa22adddb6 diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 5501fb51..62ea6fa9 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -79,11 +79,11 @@ dirfd_copy_attributes_and_xattrs (int src_parent_dfd, } static gboolean -copy_dir_recurse_fsync (int src_parent_dfd, - int dest_parent_dfd, - const char *name, - GCancellable *cancellable, - GError **error) +copy_dir_recurse (int src_parent_dfd, + int dest_parent_dfd, + const char *name, + GCancellable *cancellable, + GError **error) { gboolean ret = FALSE; int src_dfd = -1; @@ -133,26 +133,19 @@ copy_dir_recurse_fsync (int src_parent_dfd, if (S_ISDIR (child_stbuf.st_mode)) { - if (!copy_dir_recurse_fsync (src_dfd, dest_dfd, name, - cancellable, error)) + if (!copy_dir_recurse (src_dfd, dest_dfd, name, + cancellable, error)) goto out; } else { if (!glnx_file_copy_at (src_dfd, name, &child_stbuf, dest_dfd, name, - GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_DATASYNC, + GLNX_FILE_COPY_OVERWRITE, cancellable, error)) goto out; } } - /* And finally, fsync the fd */ - if (fsync (dest_dfd) != 0) - { - gs_set_error_from_errno (error, errno); - goto out; - } - ret = TRUE; out: if (srcd) @@ -330,15 +323,15 @@ copy_modified_config_file (int orig_etc_fd, if (S_ISDIR (modified_stbuf.st_mode)) { - if (!copy_dir_recurse_fsync (modified_etc_fd, new_etc_fd, path, - cancellable, error)) + if (!copy_dir_recurse (modified_etc_fd, new_etc_fd, path, + cancellable, error)) goto out; } else if (S_ISLNK (modified_stbuf.st_mode) || S_ISREG (modified_stbuf.st_mode)) { if (!glnx_file_copy_at (modified_etc_fd, path, &modified_stbuf, new_etc_fd, path, - GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_DATASYNC, + GLNX_FILE_COPY_OVERWRITE, cancellable, error)) goto out; } @@ -350,12 +343,6 @@ copy_modified_config_file (int orig_etc_fd, goto out; } - if (fsync (dest_parent_dfd) != 0) - { - gs_set_error_from_errno (error, errno); - goto out; - } - ret = TRUE; out: if (dest_parent_dfd != -1)