Commit 09eeb07
cifs: do not depend on release_iface for maintaining iface_list
parse_server_interfaces should be in complete charge of maintaining
the iface_list linked list. Today, iface entries are removed
from the list only when the last refcount is dropped.
i.e. in release_iface. However, this can result in undercounting
of refcount if the server stops advertising interfaces (which
Azure SMB server does).
This change puts parse_server_interfaces in full charge of
maintaining the iface_list. So if an empty list is returned
by the server, the entries in the list will immediately be
removed. This way, a following call to the same function will
not find entries in the list.
Fixes: aa45dad ("cifs: change iface_list from array to sorted linked list")
Cc: stable@vger.kernel.org
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 7257bcf commit 09eeb07
2 files changed
Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
997 | | - | |
998 | 997 | | |
999 | 998 | | |
1000 | 999 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | | - | |
600 | | - | |
| 598 | + | |
601 | 599 | | |
602 | 600 | | |
603 | | - | |
| 601 | + | |
604 | 602 | | |
605 | | - | |
606 | | - | |
607 | | - | |
| 603 | + | |
608 | 604 | | |
609 | 605 | | |
610 | 606 | | |
| |||
678 | 674 | | |
679 | 675 | | |
680 | 676 | | |
681 | | - | |
682 | 677 | | |
683 | | - | |
684 | | - | |
685 | 678 | | |
686 | 679 | | |
687 | 680 | | |
| |||
748 | 741 | | |
749 | 742 | | |
750 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
751 | 758 | | |
752 | 759 | | |
753 | 760 | | |
| |||
0 commit comments