Commit 3d7b0894 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Fix a bug in rpcauth_prune_expired

Don't want to evict a credential if cred->cr_expire == jiffies, since that
means that it was just placed on the cred_unused list. We therefore need to
use time_in_range() rather than time_in_range_open().
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent c81eddb0
...@@ -237,7 +237,7 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan) ...@@ -237,7 +237,7 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
list_for_each_entry_safe(cred, next, &cred_unused, cr_lru) { list_for_each_entry_safe(cred, next, &cred_unused, cr_lru) {
/* Enforce a 60 second garbage collection moratorium */ /* Enforce a 60 second garbage collection moratorium */
if (time_in_range_open(cred->cr_expire, expired, jiffies) && if (time_in_range(cred->cr_expire, expired, jiffies) &&
test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags) != 0) test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags) != 0)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment