From: Brian Foster <bfoster@redhat.com>
To: "Wang, Yalin" <Yalin.Wang@sonymobile.com>
Cc: "'david@fromorbit.com'" <david@fromorbit.com>,
"'xfs@oss.sgi.com'" <xfs@oss.sgi.com>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xfs:change kmem_free to use generic kvfree()
Date: Thu, 29 Jan 2015 10:46:52 -0500 [thread overview]
Message-ID: <20150129154652.GK17652@laptop.bfoster> (raw)
In-Reply-To: <35FD53F367049845BC99AC72306C23D1044A02027DFF@CNBJMBX05.corpusers.net>
On Wed, Jan 28, 2015 at 02:08:47PM +0800, Wang, Yalin wrote:
> Change kmem_free to use kvfree() generic function,
> remove the duplicated code.
>
> Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
> ---
Looks good...
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/kmem.c | 10 ----------
> fs/xfs/kmem.h | 5 ++++-
> 2 files changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/fs/xfs/kmem.c b/fs/xfs/kmem.c
> index 53e95b2..a7a3a63 100644
> --- a/fs/xfs/kmem.c
> +++ b/fs/xfs/kmem.c
> @@ -91,16 +91,6 @@ kmem_zalloc_large(size_t size, xfs_km_flags_t flags)
> return ptr;
> }
>
> -void
> -kmem_free(const void *ptr)
> -{
> - if (!is_vmalloc_addr(ptr)) {
> - kfree(ptr);
> - } else {
> - vfree(ptr);
> - }
> -}
> -
> void *
> kmem_realloc(const void *ptr, size_t newsize, size_t oldsize,
> xfs_km_flags_t flags)
> diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h
> index 64db0e5..cc6b768 100644
> --- a/fs/xfs/kmem.h
> +++ b/fs/xfs/kmem.h
> @@ -63,7 +63,10 @@ kmem_flags_convert(xfs_km_flags_t flags)
> extern void *kmem_alloc(size_t, xfs_km_flags_t);
> extern void *kmem_zalloc_large(size_t size, xfs_km_flags_t);
> extern void *kmem_realloc(const void *, size_t, size_t, xfs_km_flags_t);
> -extern void kmem_free(const void *);
> +static inline void kmem_free(const void *ptr)
> +{
> + kvfree(ptr);
> +}
>
>
> extern void *kmem_zalloc_greedy(size_t *, size_t, size_t);
> --
> 2.2.2
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-01-29 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 6:08 [PATCH] xfs:change kmem_free to use generic kvfree() Wang, Yalin
2015-01-29 15:46 ` Brian Foster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150129154652.GK17652@laptop.bfoster \
--to=bfoster@redhat.com \
--cc=Yalin.Wang@sonymobile.com \
--cc=david@fromorbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox