Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c20ddc64 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull quota fix from Jan Kara:
 "Fix locking of dquot shrinker"

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  quota: missing lock in dqcache_shrink_scan()
parents d7b6e53e d68aab6b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -702,6 +702,7 @@ dqcache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
	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);
@@ -713,6 +714,7 @@ dqcache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
		freed++;
		head = free_dquots.prev;
	}
	spin_unlock(&dq_list_lock);
	return freed;
}