lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 05/14] ceph: Use kvfree() in ceph_put_page_vector()
From
Date

> On May 16, 2015, at 02:35, Pekka Enberg <penberg@kernel.org> wrote:
>
> Use kvfree instead of open-coding it.
>
> Cc: "Yan, Zheng" <zyan@redhat.com>
> Cc: Sage Weil <sage@redhat.com>
> Signed-off-by: Pekka Enberg <penberg@kernel.org>
> ---
> net/ceph/pagevec.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c
> index 096d914..d4f5f22 100644
> --- a/net/ceph/pagevec.c
> +++ b/net/ceph/pagevec.c
> @@ -51,10 +51,7 @@ void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty)
> set_page_dirty_lock(pages[i]);
> put_page(pages[i]);
> }
> - if (is_vmalloc_addr(pages))
> - vfree(pages);
> - else
> - kfree(pages);
> + kvfree(pages);
> }
> EXPORT_SYMBOL(ceph_put_page_vector);

Thanks. but Ilya Dryomov has already submitted a similar patch.

>
> --
> 2.1.0
>



\
 
 \ /
  Last update: 2015-05-18 09:21    [W:0.113 / U:1.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site