diff mbox series

[05/10] mm: call vfree instead of __vunmap from delayed_vfree_work

Message ID 20230119100226.789506-6-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/10] vmalloc: reject vmap with VM_FLUSH_RESET_PERMS | expand

Commit Message

Christoph Hellwig Jan. 19, 2023, 10:02 a.m. UTC
This adds an extra, never taken,  in_interrupt() branch, but will allow
to cut down the maze of vfree helpers.

Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 mm/vmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Uladzislau Rezki Jan. 19, 2023, 6:48 p.m. UTC | #1
On Thu, Jan 19, 2023 at 11:02:21AM +0100, Christoph Hellwig wrote:
> This adds an extra, never taken,  in_interrupt() branch, but will allow
> to cut down the maze of vfree helpers.
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---
>  mm/vmalloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index daeb28b54663d5..3c07520b8b821b 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2722,7 +2722,7 @@ static void delayed_vfree_work(struct work_struct *w)
>  	struct llist_node *t, *llnode;
>  
>  	llist_for_each_safe(llnode, t, llist_del_all(&p->list))
> -		__vunmap((void *)llnode, 1);
> +		vfree(llnode);
>  }
>  
>  /**
> -- 
> 2.39.0
> 
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>

--
Uladzislau Rezki
diff mbox series

Patch

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index daeb28b54663d5..3c07520b8b821b 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2722,7 +2722,7 @@  static void delayed_vfree_work(struct work_struct *w)
 	struct llist_node *t, *llnode;
 
 	llist_for_each_safe(llnode, t, llist_del_all(&p->list))
-		__vunmap((void *)llnode, 1);
+		vfree(llnode);
 }
 
 /**