Btrfs: stop leaking btrfs_bios on readahead
authorIlya Dryomov <idryomov@gmail.com>
Fri, 4 Nov 2011 13:41:02 +0000 (09:41 -0400)
committerChris Mason <chris.mason@oracle.com>
Sun, 6 Nov 2011 08:11:08 +0000 (03:11 -0500)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/reada.c

index cd857119ba8a4cd2ea9ee85bb1a60fe07fb3ad11..35eaf689367901e45b1c652476b634e315bdc7b2 100644 (file)
@@ -423,6 +423,7 @@ again:
        }
        spin_unlock(&fs_info->reada_lock);
 
+       kfree(multi);
        return re;
 
 error:
@@ -447,6 +448,7 @@ error:
                kref_put(&zone->refcnt, reada_zone_release);
                spin_unlock(&fs_info->reada_lock);
        }
+       kfree(multi);
        kfree(re);
        if (looped)
                goto again;