projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93a05e6
)
SUNRPC: Ensure rpcauth_prune_expired() respects the nr_to_scan parameter
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 13 May 2010 16:51:06 +0000
(12:51 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Fri, 14 May 2010 19:09:35 +0000
(15:09 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/auth.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sunrpc/auth.c
b/net/sunrpc/auth.c
index c40856f589f03f0583ada299251f56c61dd9cb30..73affb8624faa06ee95c6ce5bf5e7ea364908d02 100644
(file)
--- a/
net/sunrpc/auth.c
+++ b/
net/sunrpc/auth.c
@@
-236,6
+236,8
@@
rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
list_for_each_entry_safe(cred, next, &cred_unused, cr_lru) {
+ if (nr_to_scan-- == 0)
+ break;
/*
* Enforce a 60 second garbage collection moratorium
* Note that the cred_unused list must be time-ordered.
@@
-255,11
+257,8
@@
rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
get_rpccred(cred);
list_add_tail(&cred->cr_lru, free);
rpcauth_unhash_cred_locked(cred);
- nr_to_scan--;
}
spin_unlock(cache_lock);
- if (nr_to_scan == 0)
- break;
}
return (number_cred_unused / 100) * sysctl_vfs_cache_pressure;
}