• Jeff Layton's avatar
    btrfs: btrfs_wait_tree_block_writeback can be void return · 3189ff77
    Jeff Layton authored
    Nothing checks its return value.
    
    Is it safe to skip checking return value of btrfs_wait_tree_block_writeback?
    
    Liu Bo: I think yes, it's used in walk_log_tree which is called in two
    places, free_log_tree and log replay.  For free_log_tree, it waits for
    any running writeback of the extent buffer under freeing to finish in
    case we need to access the eb pointer from page->private, and it's OK to
    not check the return value, while for log replay, it's doesn't wait
    because wc->wait is not set. So neither cares about the writeback error.
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Reviewed-by: default avatarJan Kara <jack@suse.cz>
    Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
    [ added more explanation to changelog, from Liu Bo ]
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    3189ff77
disk-io.h 5.83 KB