Commit 0e55f63
ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
After this commit (e2b76ab "ksmbd: add support for read compound"),
response buffer management was changed to use dynamic iov array.
In the new design, smb2_calc_max_out_buf_len() expects the second
argument (hdr2_len) to be the offset of ->Buffer field in the
response structure, not a hardcoded magic number.
Fix the remaining call sites to use the correct offsetof() value.
Cc: [email protected]
Fixes: e2b76ab ("ksmbd: add support for read compound")
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>1 parent 309b44e commit 0e55f63
1 file changed
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4452 | 4452 | | |
4453 | 4453 | | |
4454 | 4454 | | |
4455 | | - | |
4456 | | - | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
4457 | 4458 | | |
4458 | 4459 | | |
4459 | 4460 | | |
| |||
4720 | 4721 | | |
4721 | 4722 | | |
4722 | 4723 | | |
4723 | | - | |
4724 | | - | |
| 4724 | + | |
| 4725 | + | |
| 4726 | + | |
4725 | 4727 | | |
4726 | 4728 | | |
4727 | 4729 | | |
| |||
5047 | 5049 | | |
5048 | 5050 | | |
5049 | 5051 | | |
5050 | | - | |
5051 | | - | |
| 5052 | + | |
| 5053 | + | |
| 5054 | + | |
5052 | 5055 | | |
5053 | 5056 | | |
5054 | 5057 | | |
| |||
8206 | 8209 | | |
8207 | 8210 | | |
8208 | 8211 | | |
8209 | | - | |
8210 | | - | |
| 8212 | + | |
| 8213 | + | |
| 8214 | + | |
8211 | 8215 | | |
8212 | 8216 | | |
8213 | 8217 | | |
| |||
0 commit comments