Commit a902f3d
committed
SUNRPC: Create a helper function for accessing the rpc_clnt's xprt_switch
This function takes the necessary rcu read lock to dereference the
client's rpc_xprt_switch and bump the reference count so it doesn't
disappear underneath us before returning. This does mean that callers
are responsible for calling xprt_switch_put() on the returned object
when they are done with it.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>1 parent 5f1e77b commit a902f3d
1 file changed
Lines changed: 21 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
801 | | - | |
802 | | - | |
| 800 | + | |
803 | 801 | | |
804 | 802 | | |
805 | 803 | | |
806 | 804 | | |
807 | 805 | | |
808 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
809 | 818 | | |
810 | 819 | | |
811 | 820 | | |
| |||
2206 | 2215 | | |
2207 | 2216 | | |
2208 | 2217 | | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
| 2218 | + | |
2212 | 2219 | | |
2213 | 2220 | | |
2214 | 2221 | | |
| |||
3251 | 3258 | | |
3252 | 3259 | | |
3253 | 3260 | | |
3254 | | - | |
3255 | | - | |
3256 | | - | |
| 3261 | + | |
3257 | 3262 | | |
| 3263 | + | |
3258 | 3264 | | |
3259 | 3265 | | |
3260 | 3266 | | |
3261 | 3267 | | |
| 3268 | + | |
| 3269 | + | |
3262 | 3270 | | |
3263 | 3271 | | |
3264 | 3272 | | |
3265 | 3273 | | |
3266 | | - | |
3267 | | - | |
3268 | | - | |
3269 | | - | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
3270 | 3278 | | |
3271 | 3279 | | |
3272 | 3280 | | |
| |||
0 commit comments