Commit a68a679
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.
PiperOrigin-RevId: 9754022621 parent 80bb741 commit a68a679
3 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
| 567 | + | |
567 | 568 | | |
568 | 569 | | |
569 | 570 | | |
| |||
682 | 683 | | |
683 | 684 | | |
684 | 685 | | |
| 686 | + | |
685 | 687 | | |
686 | 688 | | |
687 | 689 | | |
| |||
811 | 813 | | |
812 | 814 | | |
813 | 815 | | |
| 816 | + | |
814 | 817 | | |
815 | 818 | | |
816 | 819 | | |
| |||
1163 | 1166 | | |
1164 | 1167 | | |
1165 | 1168 | | |
| 1169 | + | |
1166 | 1170 | | |
1167 | 1171 | | |
1168 | 1172 | | |
| |||
1193 | 1197 | | |
1194 | 1198 | | |
1195 | 1199 | | |
| 1200 | + | |
1196 | 1201 | | |
1197 | 1202 | | |
1198 | 1203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
0 commit comments