From: Josef Bacik Date: Mon, 25 Apr 2011 23:43:52 +0000 (-0400) Subject: Btrfs: put the right bio if we have an error X-Git-Tag: upstream/snapshot3+hdmi~10453^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64728bbbf892ea7a4aba502c436afbe362217fb9;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Btrfs: put the right bio if we have an error In btrfs_submit_direct_hook if the first btrfs_map_block fails we need to put the orig_bio, not bio. Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c718d27..ad6b515 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6041,7 +6041,7 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, ret = btrfs_map_block(map_tree, READ, start_sector << 9, &map_length, NULL, 0); if (ret) { - bio_put(bio); + bio_put(orig_bio); return -EIO; }