]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Btrfs: process all async extents on compressed write failure
authorFilipe Manana <fdmanana@suse.com>
Mon, 6 Oct 2014 21:14:25 +0000 (22:14 +0100)
committerChris Mason <clm@fb.com>
Fri, 21 Nov 2014 01:14:26 +0000 (17:14 -0800)
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>
fs/btrfs/inode.c

index b759585fbc6abf844791e675af4c981ff23d79ff..d1a52850d17d5cea24cebe8716f0c4ba652f44c7 100644 (file)
@@ -839,13 +839,9 @@ retry:
                }
                alloc_hint = ins.objectid + ins.offset;
                kfree(async_extent);
-               if (ret)
-                       goto out;
                cond_resched();
        }
-       ret = 0;
-out:
-       return ret;
+       return 0;
 out_free_reserve:
        btrfs_free_reserved_extent(root, ins.objectid, ins.offset, 1);
 out_free: