Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
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()
This commit is contained in:
@@ -702,6 +702,7 @@ dqcache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
|
|||||||
struct dquot *dquot;
|
struct dquot *dquot;
|
||||||
unsigned long freed = 0;
|
unsigned long freed = 0;
|
||||||
|
|
||||||
|
spin_lock(&dq_list_lock);
|
||||||
head = free_dquots.prev;
|
head = free_dquots.prev;
|
||||||
while (head != &free_dquots && sc->nr_to_scan) {
|
while (head != &free_dquots && sc->nr_to_scan) {
|
||||||
dquot = list_entry(head, struct dquot, dq_free);
|
dquot = list_entry(head, struct dquot, dq_free);
|
||||||
@@ -713,6 +714,7 @@ dqcache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
|
|||||||
freed++;
|
freed++;
|
||||||
head = free_dquots.prev;
|
head = free_dquots.prev;
|
||||||
}
|
}
|
||||||
|
spin_unlock(&dq_list_lock);
|
||||||
return freed;
|
return freed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user