File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,8 @@ static inline int xprt_lock_write(struct rpc_xprt *xprt, struct rpc_task *task)
298
298
{
299
299
int retval ;
300
300
301
+ if (test_bit (XPRT_LOCKED , & xprt -> state ) && xprt -> snd_task == task )
302
+ return 1 ;
301
303
spin_lock_bh (& xprt -> transport_lock );
302
304
retval = xprt -> ops -> reserve_xprt (xprt , task );
303
305
spin_unlock_bh (& xprt -> transport_lock );
@@ -375,6 +377,8 @@ EXPORT_SYMBOL_GPL(xprt_release_xprt_cong);
375
377
376
378
static inline void xprt_release_write (struct rpc_xprt * xprt , struct rpc_task * task )
377
379
{
380
+ if (xprt -> snd_task != task )
381
+ return ;
378
382
spin_lock_bh (& xprt -> transport_lock );
379
383
xprt -> ops -> release_xprt (xprt , task );
380
384
spin_unlock_bh (& xprt -> transport_lock );
@@ -1645,8 +1649,7 @@ void xprt_release(struct rpc_task *task)
1645
1649
if (req == NULL ) {
1646
1650
if (task -> tk_client ) {
1647
1651
xprt = task -> tk_xprt ;
1648
- if (xprt -> snd_task == task )
1649
- xprt_release_write (xprt , task );
1652
+ xprt_release_write (xprt , task );
1650
1653
}
1651
1654
return ;
1652
1655
}
You can’t perform that action at this time.
0 commit comments