Skip to content

Commit

Permalink
Staging: zram: Add a missing GFP_KERNEL specifier in zram_init_device()
Browse files Browse the repository at this point in the history
The allocation of zram->compress_buffer is misssing a GFP_* specifier.
This is equivalent to GFP_NOWAIT but it is more likely a omission.
Since the allocation just above it uses GFP_KERNEL, there is no reason
to use GFP_NOWAIT here. Therefore, add GFP_KERNEL.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jerome Marchand authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent 04e7bba commit fb92728
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ int zram_init_device(struct zram *zram)
goto fail_no_table;
}

zram->compress_buffer = (void *)__get_free_pages(__GFP_ZERO, 1);
zram->compress_buffer =
(void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 1);
if (!zram->compress_buffer) {
pr_err("Error allocating compressor buffer space\n");
ret = -ENOMEM;
Expand Down

0 comments on commit fb92728

Please sign in to comment.