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:
commit
c20ddc6499
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue