[Tux3] Patch: Freestanding kernel unit test for block operations

Daniel Phillips phillips at phunq.net
Sat Jan 17 03:59:38 PST 2009


And I have another bug here:

> +	if (!PageUptodate(oldpage)) {
> +		oldpage = read_mapping_page(mapping, oldpage->index, NULL);
> +		if (IS_ERR(oldpage))
> +			return oldpage;
> +	}
> +	put_page(oldpage); // drop refcount provided by read_mapping_page

The put_page should only be done if read_mapping_page was called.

+	if (!PageUptodate(oldpage)) {
+		oldpage = read_mapping_page(mapping, oldpage->index, NULL);
+		if (IS_ERR(oldpage))
+			return oldpage;
+		put_page(oldpage); // drop refcount from read_mapping_page
+	}

Daniel

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list