Skip to content

cgroup2fs: DecRef inodes returned by Lookup for consistency - #14576

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test/cl975402262
Sep 5, 2026
Merged

cgroup2fs: DecRef inodes returned by Lookup for consistency#14576
copybara-service[bot] merged 1 commit into
masterfrom
test/cl975402262

Conversation

@copybara-service

Copy link
Copy Markdown

cgroup2fs: DecRef inodes returned by Lookup for consistency

OrderedChildren.Lookup returns the inode with a ref that the caller is
expected to release (normally by handing it to a dentry via Init). Five
cgroup2fs call sites that look an inode up for a transient purpose
(permission checks, control-file read/write, interface-file removal)
never released that ref.

This is NOT a bug fix: every inode these sites can return
(cgroupInterfaceFile and eventFile, both via kernfs.DynamicBytesFile,
and cgroup directories themselves) embeds kernfs.InodeNoopRefCount, so
IncRef/DecRef are no-ops and nothing leaks today. The change only makes
the ref discipline explicit and correct, so these sites stay safe if a
lookup ever returns a genuinely refcounted inode.

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Sep 3, 2026
OrderedChildren.Lookup returns the inode with a ref that the caller is
expected to release (normally by handing it to a dentry via Init). Five
cgroup2fs call sites that look an inode up for a transient purpose
(permission checks, control-file read/write, interface-file removal)
never released that ref.

This is NOT a bug fix: every inode these sites can return
(cgroupInterfaceFile and eventFile, both via kernfs.DynamicBytesFile,
and cgroup directories themselves) embeds kernfs.InodeNoopRefCount, so
IncRef/DecRef are no-ops and nothing leaks today. The change only makes
the ref discipline explicit and correct, so these sites stay safe if a
lookup ever returns a genuinely refcounted inode.

PiperOrigin-RevId: 976563179
@copybara-service
copybara-service Bot merged commit 42d8c41 into master Sep 5, 2026
2 of 4 checks passed
@copybara-service
copybara-service Bot deleted the test/cl975402262 branch September 5, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant