From: Jeff Mahoney Date: Tue, 4 Oct 2011 03:23:13 +0000 (-0400) Subject: btrfs: Factor out tree->ops->merge_bio_hook call X-Git-Tag: v3.4-rc1~22^2~13^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3444a97255de907f32562741fb6d104620b9fce3;p=pandora-kernel.git btrfs: Factor out tree->ops->merge_bio_hook call In submit_extent_page, there's a visually noisy if statement that, in the midst of other conditions, does the tree dependency for tree->ops and tree->ops->merge_bio_hook before calling it, and then another condition afterwards. If an error is returned from merge_bio_hook, there's no way to catch it. It's considered a routine "1" return value instead of a failure. This patch factors out the dependency check into a new local merge_bio routine and BUG's on an error. The if statement is less noisy as a side- effect. Signed-off-by: Jeff Mahoney --- Reading git-diff-tree failed