summaryrefslogtreecommitdiff
path: root/fs/quota/dquot.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2018-07-12 23:19:58 +0300
committerThomas Gleixner <tglx@linutronix.de>2018-07-12 23:19:58 +0300
commitc6bb11147eb09bd39f316c6062455b88c905ab6e (patch)
tree5a1a6ec2970daef5fa8546741ced3ef3924bf807 /fs/quota/dquot.c
parenta8802d97e73346bc81609df9dfba7d3306f40d87 (diff)
parentb061c7a513afe14a68af41cec7c3476befc40e95 (diff)
downloadlinux-c6bb11147eb09bd39f316c6062455b88c905ab6e.tar.xz
Merge branch 'fortglx/4.19/time' of https://git.linaro.org/people/john.stultz/linux into timers/core
Pull timekeeping updates from John Stultz: - Make the timekeeping update more precise when NTP frequency is set directly by updating the multiplier. - Adjust selftests
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r--fs/quota/dquot.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index d88231e3b2be..fc20e06c56ba 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -711,21 +711,18 @@ EXPORT_SYMBOL(dquot_quota_sync);
static unsigned long
dqcache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
{
- struct list_head *head;
struct dquot *dquot;
unsigned long freed = 0;
spin_lock(&dq_list_lock);
- head = free_dquots.prev;
- while (head != &free_dquots && sc->nr_to_scan) {
- dquot = list_entry(head, struct dquot, dq_free);
+ while (!list_empty(&free_dquots) && sc->nr_to_scan) {
+ dquot = list_first_entry(&free_dquots, struct dquot, dq_free);
remove_dquot_hash(dquot);
remove_free_dquot(dquot);
remove_inuse(dquot);
do_destroy_dquot(dquot);
sc->nr_to_scan--;
freed++;
- head = free_dquots.prev;
}
spin_unlock(&dq_list_lock);
return freed;