sunrpc: fix expiry of auth creds
authorDan Aloni <dan.aloni@vastdata.com>
Mon, 4 Jul 2022 12:56:57 +0000 (15:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:05 +0000 (11:40 +0200)
commit63e921d4edb3adc9e64ed4879ca41a5bda3d4e32
tree52032d2a895245523db6a4bc7fa30344a68e0f96
parent3f16630fa23b998e7d64f055186ef818b2bf4603
sunrpc: fix expiry of auth creds

commit f1bafa7375c01ff71fb7cb97c06caadfcfe815f3 upstream.

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: 95cd623250ad ('SUNRPC: Clean up the AUTH cache code')
Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/auth.c