Commit ee36a3b
cifs: make sure that channel scaling is done only once
Following a successful cifs_tree_connect, we have the code
to scale up/down the number of channels in the session.
However, it is not protected by a lock today.
As a result, this code can be executed by several processes
that select the same channel. The core functions handle this
well, as they pick chan_lock. However, we've seen cases where
smb2_reconnect throws some warnings.
To fix that, this change introduces a flags bitmap inside the
cifs_ses structure. A new flag type is used to ensure that
only one process enters this section at any time.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 41bccc9 commit ee36a3b
2 files changed
+20
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
1035 | 1037 | | |
1036 | 1038 | | |
1037 | 1039 | | |
| |||
1064 | 1066 | | |
1065 | 1067 | | |
1066 | 1068 | | |
| 1069 | + | |
1067 | 1070 | | |
1068 | 1071 | | |
1069 | 1072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
402 | 411 | | |
403 | 412 | | |
404 | 413 | | |
| |||
428 | 437 | | |
429 | 438 | | |
430 | 439 | | |
431 | | - | |
| 440 | + | |
432 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
433 | 445 | | |
434 | 446 | | |
435 | | - | |
436 | | - | |
437 | 447 | | |
438 | 448 | | |
439 | 449 | | |
440 | 450 | | |
| 451 | + | |
441 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
442 | 456 | | |
443 | 457 | | |
444 | 458 | | |
| |||
0 commit comments