Commit 3a7b6d0
cifs: Don't need state locking in smb2_get_mid_entry()
There's no need to get ->srv_lock or ->ses_lock in smb2_get_mid_entry() as
all that happens of relevance (to the lock) inside the locked sections is
the reading of one status value in each.
Replace the locking with READ_ONCE() and use a switch instead of a chain of
if-statements.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
cc: Shyam Prasad N <sprasad@microsoft.com>
cc: Tom Talpey <tom@talpey.com>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 87fba18 commit 3a7b6d0
1 file changed
Lines changed: 20 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
687 | | - | |
688 | | - | |
689 | | - | |
| 687 | + | |
| 688 | + | |
690 | 689 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
| 690 | + | |
695 | 691 | | |
696 | 692 | | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
| 693 | + | |
| 694 | + | |
711 | 695 | | |
712 | | - | |
713 | | - | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
714 | 699 | | |
715 | 700 | | |
716 | | - | |
717 | | - | |
718 | | - | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
719 | 710 | | |
720 | | - | |
721 | 711 | | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
722 | 715 | | |
723 | | - | |
724 | 716 | | |
725 | 717 | | |
726 | 718 | | |
| |||
0 commit comments