diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-10-30 13:22:14 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-10-30 13:22:14 -0400 |
commit | cfbc246eaae2a1089911016094b74b3055e8a906 (patch) | |
tree | c450f02cd605b38a578778dacd9c8768ce041789 /fs/btrfs/inode.c | |
parent | 87ef2bb46bfc4be0b40799e68115cbe28d80a1bd (diff) |
Btrfs: walk compressed pages based on the nr_pages count instead of bytes
The byte walk counting was awkward and error prone. This uses the
number of pages sent the higher layer to build bios.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-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 9797592dc86b..6739424c0fe6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -338,7 +338,7 @@ again: | |||
338 | if (!btrfs_test_flag(inode, NOCOMPRESS) && | 338 | if (!btrfs_test_flag(inode, NOCOMPRESS) && |
339 | btrfs_test_opt(root, COMPRESS)) { | 339 | btrfs_test_opt(root, COMPRESS)) { |
340 | WARN_ON(pages); | 340 | WARN_ON(pages); |
341 | pages = kmalloc(sizeof(struct page *) * nr_pages, GFP_NOFS); | 341 | pages = kzalloc(sizeof(struct page *) * nr_pages, GFP_NOFS); |
342 | 342 | ||
343 | /* we want to make sure the amount of IO required to satisfy | 343 | /* we want to make sure the amount of IO required to satisfy |
344 | * a random read is reasonably small, so we limit the size | 344 | * a random read is reasonably small, so we limit the size |