• Jeff Mahoney's avatar
    btrfs: Factor out tree->ops->merge_bio_hook call · 3444a972
    Jeff Mahoney authored
    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: default avatarJeff Mahoney <jeffm@suse.com>
    3444a972
extent_io.c 110 KB