summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-07-16 05:47:42 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-16 05:47:42 +0200
commitc20ddc649990ecbe6813afb6e605415e2d083d68 (patch)
treebf246f651fecb29ecae88b6edc7239d83ff7c435 /fs
parentMerge tag 'gpio-v3.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/lin... (diff)
parentquota: missing lock in dqcache_shrink_scan() (diff)
downloadlinux-c20ddc649990ecbe6813afb6e605415e2d083d68.tar.xz
linux-c20ddc649990ecbe6813afb6e605415e2d083d68.zip
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()
Diffstat (limited to 'fs')
-rw-r--r--fs/quota/dquot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 9cd5f63715c0..7f30bdc57d13 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -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;
}