kata-containers-cc: fix tarfs build with kernel 6.6+ (i_ctime removal)#17776
Draft
romoh wants to merge 1 commit into
Draft
kata-containers-cc: fix tarfs build with kernel 6.6+ (i_ctime removal)#17776romoh wants to merge 1 commit into
romoh wants to merge 1 commit into
Conversation
Linux kernel 6.6 removed the i_ctime field from struct inode, replacing it with inode_set_ctime()/inode_get_ctime() accessors. The tarfs kernel module shipped in kata-containers-cc-tools directly accessed inode->i_ctime, causing a build failure when compiling against kernel-uvm 6.6.137.mshv1-1.azl3 headers. This patch adds a LINUX_VERSION_CODE guard to use the new accessor on 6.6+ while preserving backward compatibility. Fixes: mariner-org/mariner#19827 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e81b276 to
9a2086b
Compare
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.
Linux kernel 6.6 removed the i_ctime field from struct inode, replacing it with inode_set_ctime()/inode_get_ctime() accessors. The tarfs kernel module shipped in kata-containers-cc-tools directly accessed inode->i_ctime, causing a build failure when compiling against kernel-uvm 6.6.137.mshv1-1.azl3 headers.
This patch adds a LINUX_VERSION_CODE guard to use the new accessor on 6.6+ while preserving backward compatibility.
Fixes: mariner-org/mariner#19827