Jelajahi Sumber

Btrfs: stop leaking btrfs_bios on readahead

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Ilya Dryomov 14 tahun lalu
induk
melakukan
9510dc4c62
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      fs/btrfs/reada.c

+ 2 - 0
fs/btrfs/reada.c

@@ -423,6 +423,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
 	}
 	spin_unlock(&fs_info->reada_lock);
 
+	kfree(multi);
 	return re;
 
 error:
@@ -447,6 +448,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
 		kref_put(&zone->refcnt, reada_zone_release);
 		spin_unlock(&fs_info->reada_lock);
 	}
+	kfree(multi);
 	kfree(re);
 	if (looped)
 		goto again;