diff options
author | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:29 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:29 -0500 |
commit | 285e728b0ac55b53a673114096168d6f74930167 (patch) | |
tree | 725dbd61cc9a3fecd593163d9b2cb0a061315cbf | |
parent | 1bccf513ac49d44604ba1cddcc29f5886e70f1b6 (diff) |
FS-Cache: Don't delete pending pages from the page-store tracking tree
Don't delete pending pages from the page-store tracking tree, but rather send
them for another write as they've presumably been updated.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | fs/fscache/page.c | 7 | ||||
-rw-r--r-- | lib/radix-tree.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/fscache/page.c b/fs/fscache/page.c index 3ea8897bc217..022a5da8e130 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c | |||
@@ -57,8 +57,11 @@ static void fscache_end_page_write(struct fscache_object *object, | |||
57 | /* delete the page from the tree if it is now no longer | 57 | /* delete the page from the tree if it is now no longer |
58 | * pending */ | 58 | * pending */ |
59 | spin_lock(&cookie->stores_lock); | 59 | spin_lock(&cookie->stores_lock); |
60 | fscache_stat(&fscache_n_store_radix_deletes); | 60 | if (!radix_tree_tag_get(&cookie->stores, page->index, |
61 | xpage = radix_tree_delete(&cookie->stores, page->index); | 61 | FSCACHE_COOKIE_PENDING_TAG)) { |
62 | fscache_stat(&fscache_n_store_radix_deletes); | ||
63 | xpage = radix_tree_delete(&cookie->stores, page->index); | ||
64 | } | ||
62 | spin_unlock(&cookie->stores_lock); | 65 | spin_unlock(&cookie->stores_lock); |
63 | wake_up_bit(&cookie->flags, 0); | 66 | wake_up_bit(&cookie->flags, 0); |
64 | } | 67 | } |
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index ae6106855561..92cdd9936e3d 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -546,7 +546,6 @@ out: | |||
546 | } | 546 | } |
547 | EXPORT_SYMBOL(radix_tree_tag_clear); | 547 | EXPORT_SYMBOL(radix_tree_tag_clear); |
548 | 548 | ||
549 | #ifndef __KERNEL__ /* Only the test harness uses this at present */ | ||
550 | /** | 549 | /** |
551 | * radix_tree_tag_get - get a tag on a radix tree node | 550 | * radix_tree_tag_get - get a tag on a radix tree node |
552 | * @root: radix tree root | 551 | * @root: radix tree root |
@@ -609,7 +608,6 @@ int radix_tree_tag_get(struct radix_tree_root *root, | |||
609 | } | 608 | } |
610 | } | 609 | } |
611 | EXPORT_SYMBOL(radix_tree_tag_get); | 610 | EXPORT_SYMBOL(radix_tree_tag_get); |
612 | #endif | ||
613 | 611 | ||
614 | /** | 612 | /** |
615 | * radix_tree_next_hole - find the next hole (not-present entry) | 613 | * radix_tree_next_hole - find the next hole (not-present entry) |