All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] dmapool-rearrange-page-alloc-failure-handling.patch removed from -mm tree
@ 2023-04-06  2:44 Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-04-06  2:44 UTC (permalink / raw)
  To: mm-commits, willy, tonyb, hch, kbusch, akpm


The quilt patch titled
     Subject: dmapool: rearrange page alloc failure handling
has been removed from the -mm tree.  Its filename was
     dmapool-rearrange-page-alloc-failure-handling.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Keith Busch <kbusch@kernel.org>
Subject: dmapool: rearrange page alloc failure handling
Date: Thu, 26 Jan 2023 13:51:20 -0800

Handle the error in a condition so the good path can be in the normal
flow.

Link: https://lkml.kernel.org/r/20230126215125.4069751-8-kbusch@meta.com
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/dmapool.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

--- a/mm/dmapool.c~dmapool-rearrange-page-alloc-failure-handling
+++ a/mm/dmapool.c
@@ -292,17 +292,19 @@ static struct dma_page *pool_alloc_page(
 	page = kmalloc(sizeof(*page), mem_flags);
 	if (!page)
 		return NULL;
+
 	page->vaddr = dma_alloc_coherent(pool->dev, pool->allocation,
 					 &page->dma, mem_flags);
-	if (page->vaddr) {
-		pool_init_page(pool, page);
-		pool_initialise_page(pool, page);
-		page->in_use = 0;
-		page->offset = 0;
-	} else {
+	if (!page->vaddr) {
 		kfree(page);
-		page = NULL;
+		return NULL;
 	}
+
+	pool_init_page(pool, page);
+	pool_initialise_page(pool, page);
+	page->in_use = 0;
+	page->offset = 0;
+
 	return page;
 }
 
_

Patches currently in -mm which might be from kbusch@kernel.org are



^ permalink raw reply	[flat|nested] 3+ messages in thread
* [merged mm-stable] dmapool-rearrange-page-alloc-failure-handling.patch removed from -mm tree
@ 2023-05-05 22:39 Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-05-05 22:39 UTC (permalink / raw)
  To: mm-commits, willy, tonyb, hch, kbusch, akpm


The quilt patch titled
     Subject: dmapool: rearrange page alloc failure handling
has been removed from the -mm tree.  Its filename was
     dmapool-rearrange-page-alloc-failure-handling.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Keith Busch <kbusch@kernel.org>
Subject: dmapool: rearrange page alloc failure handling
Date: Thu, 26 Jan 2023 13:51:20 -0800

Handle the error in a condition so the good path can be in the normal
flow.

Link: https://lkml.kernel.org/r/20230126215125.4069751-8-kbusch@meta.com
Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/dmapool.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

--- a/mm/dmapool.c~dmapool-rearrange-page-alloc-failure-handling
+++ a/mm/dmapool.c
@@ -292,17 +292,19 @@ static struct dma_page *pool_alloc_page(
 	page = kmalloc(sizeof(*page), mem_flags);
 	if (!page)
 		return NULL;
+
 	page->vaddr = dma_alloc_coherent(pool->dev, pool->allocation,
 					 &page->dma, mem_flags);
-	if (page->vaddr) {
-		pool_init_page(pool, page);
-		pool_initialise_page(pool, page);
-		page->in_use = 0;
-		page->offset = 0;
-	} else {
+	if (!page->vaddr) {
 		kfree(page);
-		page = NULL;
+		return NULL;
 	}
+
+	pool_init_page(pool, page);
+	pool_initialise_page(pool, page);
+	page->in_use = 0;
+	page->offset = 0;
+
 	return page;
 }
 
_

Patches currently in -mm which might be from kbusch@kernel.org are



^ permalink raw reply	[flat|nested] 3+ messages in thread
* [merged mm-stable] dmapool-rearrange-page-alloc-failure-handling.patch removed from -mm tree
@ 2023-02-26 23:48 Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-02-26 23:48 UTC (permalink / raw)
  To: mm-commits, willy, tonyb, hch, kbusch, akpm


The quilt patch titled
     Subject: dmapool: rearrange page alloc failure handling
has been removed from the -mm tree.  Its filename was
     dmapool-rearrange-page-alloc-failure-handling.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Keith Busch <kbusch@kernel.org>
Subject: dmapool: rearrange page alloc failure handling
Date: Thu, 26 Jan 2023 13:51:20 -0800

Handle the error in a condition so the good path can be in the normal
flow.

Link: https://lkml.kernel.org/r/20230126215125.4069751-8-kbusch@meta.com
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


--- a/mm/dmapool.c~dmapool-rearrange-page-alloc-failure-handling
+++ a/mm/dmapool.c
@@ -292,17 +292,19 @@ static struct dma_page *pool_alloc_page(
 	page = kmalloc(sizeof(*page), mem_flags);
 	if (!page)
 		return NULL;
+
 	page->vaddr = dma_alloc_coherent(pool->dev, pool->allocation,
 					 &page->dma, mem_flags);
-	if (page->vaddr) {
-		pool_init_page(pool, page);
-		pool_initialise_page(pool, page);
-		page->in_use = 0;
-		page->offset = 0;
-	} else {
+	if (!page->vaddr) {
 		kfree(page);
-		page = NULL;
+		return NULL;
 	}
+
+	pool_init_page(pool, page);
+	pool_initialise_page(pool, page);
+	page->in_use = 0;
+	page->offset = 0;
+
 	return page;
 }
 
_

Patches currently in -mm which might be from kbusch@kernel.org are



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-05 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06  2:44 [merged mm-stable] dmapool-rearrange-page-alloc-failure-handling.patch removed from -mm tree Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2023-05-05 22:39 Andrew Morton
2023-02-26 23:48 Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.