aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2014-10-06 17:14:25 -0400
committerChris Mason <clm@fb.com>2014-11-20 20:14:26 -0500
commit3d7a820f713a1a3339139ea8c86a98437ae0a2c1 (patch)
treefc76571c64a9f7d7aaf4788c9fd426dcaa1f33e2 /fs
parent40ae837b43565c47ee171e704d05947fd5c2bae9 (diff)
Btrfs: process all async extents on compressed write failure
If we had an error when processing one of the async extents from our list, we were not processing the remaining async extents, meaning we would leak those async_extent structs, never release the pages with the compressed data and never unlock and clear the dirty flag from the inode's pages (those that correspond to the uncompressed content). Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b759585fbc6a..d1a52850d17d 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -839,13 +839,9 @@ retry:
839 } 839 }
840 alloc_hint = ins.objectid + ins.offset; 840 alloc_hint = ins.objectid + ins.offset;
841 kfree(async_extent); 841 kfree(async_extent);
842 if (ret)
843 goto out;
844 cond_resched(); 842 cond_resched();
845 } 843 }
846 ret = 0; 844 return 0;
847out:
848 return ret;
849out_free_reserve: 845out_free_reserve:
850 btrfs_free_reserved_extent(root, ins.objectid, ins.offset, 1); 846 btrfs_free_reserved_extent(root, ins.objectid, ins.offset, 1);
851out_free: 847out_free: