Merge pull request #2009 from cgwalters/testsuite

deploy: Avoid trying to change immutable state unnecessarily
This commit is contained in:
OpenShift Merge Robot 2020-02-14 22:56:25 +01:00 committed by GitHub
commit 13666dcd50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ _ostree_linuxfs_fd_alter_immutable_flag (int fd,
} }
else else
{ {
gboolean prev_immutable_state = (flags & EXT2_IMMUTABLE_FL) > 0;
if (prev_immutable_state == new_immutable_state)
return TRUE; /* Nothing to do */
if (new_immutable_state) if (new_immutable_state)
flags |= EXT2_IMMUTABLE_FL; flags |= EXT2_IMMUTABLE_FL;
else else