libct: intelrdt: improve directory cleanup logic#5155
Merged
rata merged 1 commit intoopencontainers:mainfrom Mar 6, 2026
Merged
libct: intelrdt: improve directory cleanup logic#5155rata merged 1 commit intoopencontainers:mainfrom
rata merged 1 commit intoopencontainers:mainfrom
Conversation
It makes more sense to save whether we should cleanup the directory after it gets created (to avoid error cases deleting a different directory) as well as tying this check to the existing os.ErrExist check rather than doing an extra stat(2). Fixes: e2baa3a ("Intel RDT: update according to spec changes.") Suggested-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
c05f9f2 to
fbaf5e3
Compare
rata
reviewed
Mar 6, 2026
Member
rata
left a comment
There was a problem hiding this comment.
Thanks! The logic now is simpler, I like that. But unsure it's correct, I think we need to handle an edge case differently.
AkihiroSuda
approved these changes
Mar 6, 2026
Member
|
@marquiz thanks for chiming in! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3832.
It makes more sense to save whether we should cleanup the directory
after it gets created (to avoid error cases deleting a different
directory) as well as tying this check to the existing os.ErrExist
check rather than doing an extra stat(2).
Fixes: e2baa3a ("Intel RDT: update according to spec changes.")
Suggested-by: Akihiro Suda akihiro.suda.cz@hco.ntt.co.jp
Signed-off-by: Aleksa Sarai cyphar@cyphar.com