Commit 64e6304
nfsd: drop the nfsd_put helper
It's not safe to call nfsd_put once nfsd_last_thread has been called, as
that function will zero out the nn->nfsd_serv pointer.
Drop the nfsd_put helper altogether and open-code the svc_put in its
callers instead. That allows us to not be reliant on the value of that
pointer when handling an error.
Fixes: 2a501f5 ("nfsd: call nfsd_last_thread() before final nfsd_put()")
Reported-by: Zhi Li <yieli@redhat.com>
Cc: NeilBrown <neilb@suse.de>
Signed-off-by: Jeffrey Layton <jlayton@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent bd018b9 commit 64e6304
2 files changed
Lines changed: 17 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| 696 | + | |
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
| |||
703 | 704 | | |
704 | 705 | | |
705 | 706 | | |
706 | | - | |
| 707 | + | |
| 708 | + | |
707 | 709 | | |
708 | | - | |
| 710 | + | |
709 | 711 | | |
710 | | - | |
711 | | - | |
712 | | - | |
| 712 | + | |
| 713 | + | |
713 | 714 | | |
714 | | - | |
| 715 | + | |
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
| |||
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
| 729 | + | |
728 | 730 | | |
729 | 731 | | |
730 | 732 | | |
| |||
737 | 739 | | |
738 | 740 | | |
739 | 741 | | |
740 | | - | |
| 742 | + | |
| 743 | + | |
741 | 744 | | |
742 | 745 | | |
743 | 746 | | |
744 | 747 | | |
745 | | - | |
| 748 | + | |
746 | 749 | | |
747 | 750 | | |
748 | 751 | | |
749 | 752 | | |
750 | | - | |
751 | | - | |
| 753 | + | |
| 754 | + | |
752 | 755 | | |
753 | | - | |
| 756 | + | |
754 | 757 | | |
755 | 758 | | |
756 | | - | |
| 759 | + | |
757 | 760 | | |
758 | 761 | | |
759 | 762 | | |
760 | 763 | | |
761 | 764 | | |
762 | | - | |
| 765 | + | |
763 | 766 | | |
764 | 767 | | |
765 | | - | |
| 768 | + | |
766 | 769 | | |
767 | 770 | | |
768 | 771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 116 | | |
124 | 117 | | |
125 | 118 | | |
| |||
0 commit comments