diff options
author | Josef Bacik <josef@redhat.com> | 2011-04-25 19:43:52 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-04-25 19:43:52 -0400 |
commit | 64728bbbf892ea7a4aba502c436afbe362217fb9 (patch) | |
tree | 40741804bbf62d942c5b440345de03866cb46c41 | |
parent | a4f0162fd4490daf2c823c185fff79080d266a7c (diff) |
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 <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c718d274a352..ad6b515173ac 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, | |||
6041 | ret = btrfs_map_block(map_tree, READ, start_sector << 9, | 6041 | ret = btrfs_map_block(map_tree, READ, start_sector << 9, |
6042 | &map_length, NULL, 0); | 6042 | &map_length, NULL, 0); |
6043 | if (ret) { | 6043 | if (ret) { |
6044 | bio_put(bio); | 6044 | bio_put(orig_bio); |
6045 | return -EIO; | 6045 | return -EIO; |
6046 | } | 6046 | } |
6047 | 6047 | ||