* [PATCH] fix brd allocation flags
@ 2008-04-17 21:14 Petr Tesarik
2008-04-22 3:34 ` Nick Piggin
0 siblings, 1 reply; 2+ messages in thread
From: Petr Tesarik @ 2008-04-17 21:14 UTC (permalink / raw)
To: Nick Piggin; +Cc: linux-kernel
Hello,
while looking at the implementation of the Ram backed block device
driver, I stumbled across a write-only local variable, which makes
little sense, so I assume it should actually work like this:
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 8536480..7bd7663 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -108,7 +108,7 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector)
#ifndef CONFIG_BLK_DEV_XIP
gfp_flags |= __GFP_HIGHMEM;
#endif
- page = alloc_page(GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO);
+ page = alloc_page(gfp_flags);
if (!page)
return NULL;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix brd allocation flags
2008-04-17 21:14 [PATCH] fix brd allocation flags Petr Tesarik
@ 2008-04-22 3:34 ` Nick Piggin
0 siblings, 0 replies; 2+ messages in thread
From: Nick Piggin @ 2008-04-22 3:34 UTC (permalink / raw)
To: Petr Tesarik; +Cc: linux-kernel
On Thu, Apr 17, 2008 at 11:14:07PM +0200, Petr Tesarik wrote:
> Hello,
>
> while looking at the implementation of the Ram backed block device
> driver, I stumbled across a write-only local variable, which makes
> little sense, so I assume it should actually work like this:
Right you are. Good catch, thanks Petr.
>
> Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
>
> diff --git a/drivers/block/brd.c b/drivers/block/brd.c
> index 8536480..7bd7663 100644
> --- a/drivers/block/brd.c
> +++ b/drivers/block/brd.c
> @@ -108,7 +108,7 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector)
> #ifndef CONFIG_BLK_DEV_XIP
> gfp_flags |= __GFP_HIGHMEM;
> #endif
> - page = alloc_page(GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO);
> + page = alloc_page(gfp_flags);
> if (!page)
> return NULL;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-22 3:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-17 21:14 [PATCH] fix brd allocation flags Petr Tesarik
2008-04-22 3:34 ` Nick Piggin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®