Commit 1b10f0b
SUNRPC: no need get cache ref when protected by rcu
rcu_read_lock/rcu_read_unlock has already provide protection for the
pointer we will reference when we call c_show. Therefore, there is no
need to obtain a cache reference to help protect cache_head.
Additionally, the .put such as expkey_put/svc_export_put will invoke
dput, which can sleep and break rcu. Stop get cache reference to fix
them all.
Fixes: ae74136 ("SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock")
Suggested-by: NeilBrown <neilb@suse.de>
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent c224edc commit 1b10f0b
1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
1441 | | - | |
1442 | | - | |
1443 | 1441 | | |
1444 | | - | |
1445 | | - | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
1446 | 1445 | | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | 1446 | | |
1453 | 1447 | | |
1454 | 1448 | | |
| |||
0 commit comments