提交 f1bafa73 编写于 作者: D Dan Aloni 提交者: Trond Myklebust

sunrpc: fix expiry of auth creds

Before this commit, with a large enough LRU of expired items (100), the
loop skipped all the expired items and was entirely ineffectual in
trimming the LRU list.

Fixes: 95cd6232 ('SUNRPC: Clean up the AUTH cache code')
Signed-off-by: NDan Aloni <dan.aloni@vastdata.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 8b4e87a1
......@@ -445,7 +445,7 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
* Enforce a 60 second garbage collection moratorium
* Note that the cred_unused list must be time-ordered.
*/
if (!time_in_range(cred->cr_expire, expired, jiffies))
if (time_in_range(cred->cr_expire, expired, jiffies))
continue;
if (!rpcauth_unhash_cred(cred))
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册