From: Liu Bo Date: Fri, 18 May 2018 03:00:20 +0000 (+0800) Subject: Btrfs: use more straightforward extent_buffer_uptodate check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e6a1d6fd276965db0ca91e91dffc0a6fb7d89254;p=openwrt%2Fstaging%2Fblogic.git Btrfs: use more straightforward extent_buffer_uptodate check If parent_transid "0" is passed to btrfs_buffer_uptodate(), btrfs_buffer_uptodate() is equivalent to extent_buffer_uptodate(), but extent_buffer_uptodate() is preferred since we don't have to look into verify_parent_transid(). Signed-off-by: Liu Bo Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 820226d42d5d..46afc9743ad0 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2445,7 +2445,7 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p, * and give up so that our caller doesn't loop forever * on our EAGAINs. */ - if (!btrfs_buffer_uptodate(tmp, 0, 0)) + if (!extent_buffer_uptodate(tmp)) ret = -EIO; free_extent_buffer(tmp); } else {