added support for fs_context operations -> parse_param#85
Merged
jserv merged 7 commits intosysprog21:masterfrom May 7, 2026
Merged
added support for fs_context operations -> parse_param#85jserv merged 7 commits intosysprog21:masterfrom
jserv merged 7 commits intosysprog21:masterfrom
Conversation
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="super.c">
<violation number="1" location="super.c:705">
P2: Missing path_put() after kern_path() leaks the looked-up path reference in the new journal_path fs_context path.</violation>
</file>
<file name="fs.c">
<violation number="1" location="fs.c:25">
P2: Allocated fs_context private data has no cleanup callback, so the mount context can leak when the fs_context is destroyed.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…ree_context and path_put after inode = d_inode() and minor fixes
Collaborator
|
Thank @EricKim27 for contributing! |
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.
This commit implements the fs_context_operations->parse_param(replacement for parse_options used at fill_super for kernels below 6.18) and modifies other related functions to work with the newly implemented operation.
Summary by cubic
Add fs_context-based mount option parsing for kernels 6.18+, adding
parse_paramforjournal_devandjournal_path, with proper context cleanup and journal loading. Legacyparse_optionsremains for older kernels.New Features
simplefs_parse_paramusingfs_parameter_spec/fs_parseforjournal_dev(u32) andjournal_path(string).simplefs_fs_context; allocated in.init_fs_context, stored infc->fs_private, and exposed via.parameters = &simplefs_param_specs.simplefs_fill_super(>=6.18), load the journal fromjournal_devor resolvejournal_pathwithkern_pathand load if it’s a block device.Bug Fixes
.freeinfs_context_operationsto freejournal_pathand the context; free any existingjournal_pathbeforekstrdup()inparse_param.path_put()to occur afterd_inode()extraction (>=6.18) and after device checks in the legacy path to prevent a possible use-after-free.Written for commit e60949b. Summary will update on new commits.