Commit d406d26
cifs: skip alloc when request has no pages
When smb3_init_transform_rq() was being called with requests (@old_rq)
which had no pages, it was unnecessarily allocating a single page for
every request in @new_rq.
Fix this by skipping page array allocation when requests have no pages
(e.g. !smb_rqst::rq_npages).
Also get rid of deprecated kmap() and use kmap_local_page() instead
while we're at it.
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent ebaad77 commit d406d26
1 file changed
Lines changed: 21 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4445 | 4445 | | |
4446 | 4446 | | |
4447 | 4447 | | |
4448 | | - | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
4449 | 4459 | | |
4450 | 4460 | | |
4451 | 4461 | | |
4452 | 4462 | | |
4453 | 4463 | | |
4454 | | - | |
4455 | | - | |
4456 | | - | |
4457 | | - | |
4458 | | - | |
4459 | | - | |
4460 | | - | |
4461 | | - | |
4462 | | - | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
4463 | 4469 | | |
4464 | 4470 | | |
4465 | 4471 | | |
| |||
4472 | 4478 | | |
4473 | 4479 | | |
4474 | 4480 | | |
4475 | | - | |
| 4481 | + | |
4476 | 4482 | | |
4477 | | - | |
4478 | | - | |
| 4483 | + | |
| 4484 | + | |
4479 | 4485 | | |
4480 | 4486 | | |
4481 | | - | |
4482 | | - | |
| 4487 | + | |
| 4488 | + | |
4483 | 4489 | | |
4484 | 4490 | | |
4485 | 4491 | | |
| |||
0 commit comments