Commit 1f531e3
don't bother with path_get()/path_put() in unix_open_file()
Once unix_sock ->path is set, we are guaranteed that its ->path will remain
unchanged (and pinned) until the socket is closed. OTOH, dentry_open()
does not modify the path passed to it.
IOW, there's no need to copy unix_sk(sk)->path in unix_open_file() - we
can just pass it to dentry_open() and be done with that.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/20250712054157.GZ1880847@ZenIV
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>1 parent a683a5b commit 1f531e3
1 file changed
Lines changed: 4 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3201 | 3201 | | |
3202 | 3202 | | |
3203 | 3203 | | |
3204 | | - | |
3205 | 3204 | | |
3206 | 3205 | | |
3207 | 3206 | | |
| |||
3211 | 3210 | | |
3212 | 3211 | | |
3213 | 3212 | | |
3214 | | - | |
3215 | | - | |
| 3213 | + | |
3216 | 3214 | | |
3217 | 3215 | | |
3218 | | - | |
3219 | | - | |
3220 | 3216 | | |
3221 | 3217 | | |
3222 | | - | |
| 3218 | + | |
3223 | 3219 | | |
3224 | | - | |
| 3220 | + | |
3225 | 3221 | | |
3226 | 3222 | | |
3227 | | - | |
3228 | | - | |
| 3223 | + | |
3229 | 3224 | | |
3230 | 3225 | | |
3231 | 3226 | | |
3232 | | - | |
3233 | | - | |
3234 | | - | |
3235 | 3227 | | |
3236 | 3228 | | |
3237 | 3229 | | |
| |||
0 commit comments