VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: David Howells <dhowells@redhat.com> 2009-11-19 18:11:29 +0000 committer: David Howells <dhowells@redhat.com> 2009-11-19 18:11:29 +0000 commit: 285e728b0ac55b53a673114096168d6f74930167 parent: 1bccf513ac49d44604ba1cddcc29f5886e70f1b6
Commit Summary:
FS-Cache: Don't delete pending pages from the page-store tracking tree
Diffstat:
1 file changed, 5 insertions, 2 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,
 		/* delete the page from the tree if it is now no longer
 		 * pending */
 		spin_lock(&cookie->stores_lock);
-		fscache_stat(&fscache_n_store_radix_deletes);
-		xpage = radix_tree_delete(&cookie->stores, page->index);
+		if (!radix_tree_tag_get(&cookie->stores, page->index,
+					FSCACHE_COOKIE_PENDING_TAG)) {
+			fscache_stat(&fscache_n_store_radix_deletes);
+			xpage = radix_tree_delete(&cookie->stores, page->index);
+		}
 		spin_unlock(&cookie->stores_lock);
 		wake_up_bit(&cookie->flags, 0);
 	}