Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377724
b: refs/heads/master
c: ee8be57
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Andrzej Siewior authored and David Howells committed Jun 19, 2013
1 parent a9fe1e3 commit f0075b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb65537ee1134d3cc55c1fa83952bc8eb1212833
refs/heads/master: ee8be57bc331f00d520c4c8a78ffa9590ed41c2c
16 changes: 10 additions & 6 deletions trunk/fs/fscache/page.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,11 +796,16 @@ void fscache_invalidate_writes(struct fscache_cookie *cookie)

_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) {
for (;;) {
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) {
spin_unlock(&cookie->stores_lock);
break;
}

for (i = n - 1; i >= 0; i--) {
page = results[i];
radix_tree_delete(&cookie->stores, page->index);
Expand All @@ -812,7 +817,6 @@ void fscache_invalidate_writes(struct fscache_cookie *cookie)
page_cache_release(results[i]);
}

spin_unlock(&cookie->stores_lock);
_leave("");
}

Expand Down

0 comments on commit f0075b7

Please sign in to comment.