Commit d4f99544 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] hfsplus: don't release not existing nodes

From: Roman Zippel <zippel@linux-m68k.org>

When releasing a page don't try to release not existing nodes.
parent 8fc4dec5
...@@ -96,7 +96,7 @@ int hfs_releasepage(struct page *page, int mask) ...@@ -96,7 +96,7 @@ int hfs_releasepage(struct page *page, int mask)
} }
hfs_bnode_unhash(node); hfs_bnode_unhash(node);
hfs_bnode_free(node); hfs_bnode_free(node);
} while (--i); } while (--i && nidx < tree->node_count);
spin_unlock(&tree->hash_lock); spin_unlock(&tree->hash_lock);
} }
//printk("releasepage: %lu,%x = %d\n", page->index, mask, res); //printk("releasepage: %lu,%x = %d\n", page->index, mask, res);
......
...@@ -96,7 +96,7 @@ int hfsplus_releasepage(struct page *page, int mask) ...@@ -96,7 +96,7 @@ int hfsplus_releasepage(struct page *page, int mask)
} }
hfs_bnode_unhash(node); hfs_bnode_unhash(node);
hfs_bnode_free(node); hfs_bnode_free(node);
} while (--i); } while (--i && nidx < tree->node_count);
spin_unlock(&tree->hash_lock); spin_unlock(&tree->hash_lock);
} }
//printk("releasepage: %lu,%x = %d\n", page->index, mask, res); //printk("releasepage: %lu,%x = %d\n", page->index, mask, res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment