linux/debian/patches/features/all/rt/fscache_compile_fix.patch

35 lines
1.0 KiB
Diff

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: fs/fscache: done merge spin_lock() in while()
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/fs/fscache/page.c
+++ b/fs/fscache/page.c
@@ -796,11 +796,13 @@ void fscache_invalidate_writes(struct fs
_enter("");
- while (spin_lock(&cookie->stores_lock),
- n = radix_tree_gang_lookup_tag(&cookie->stores, results, 0,
- ARRAY_SIZE(results),
- FSCACHE_COOKIE_PENDING_TAG),
- n > 0) {
+ do {
+ spin_lock(&cookie->stores_lock);
+ n = radix_tree_gang_lookup_tag(&cookie->stores, results, 0,
+ ARRAY_SIZE(results),
+ FSCACHE_COOKIE_PENDING_TAG);
+ if (n == 0)
+ break;
for (i = n - 1; i >= 0; i--) {
page = results[i];
radix_tree_delete(&cookie->stores, page->index);
@@ -810,7 +812,7 @@ void fscache_invalidate_writes(struct fs
for (i = n - 1; i >= 0; i--)
page_cache_release(results[i]);
- }
+ } while (1);
spin_unlock(&cookie->stores_lock);
_leave("");