Repository navigation
Commit 07b4cc6
Use mem_cgroup_from_sk in homa_rpc_alloc_server
Since Linux 6.18, struct sock has an sk_memcg field only when
CONFIG_MEMCG is set, so homa_rpc_alloc_server failed to compile in
kernels without memory cgroups (such as x86_64 and i386 defconfig).
Use mem_cgroup_from_sk, which returns NULL in that case. That function
doesn't exist before 6.18, where sk_memcg is unconditional, so keep
reading the field there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 5cb0ec2 commit 07b4cc6
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| |||
0 commit comments