From: yalin wang <yalin.wang2010@gmail.com>
To: dan.j.williams@intel.com, linux-nvdimm@ml01.01.org,
linux-kernel@vger.kernel.org
Cc: yalin wang <yalin.wang2010@gmail.com>
Subject: [PATCH] nvdimm: change to use generic kvfree()
Date: Thu, 20 Aug 2015 18:00:09 +0800 [thread overview]
Message-ID: <1440064809-26036-1-git-send-email-yalin.wang2010@gmail.com> (raw)
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
drivers/nvdimm/dimm_devs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
index c05eb80..651b8d1 100644
--- a/drivers/nvdimm/dimm_devs.c
+++ b/drivers/nvdimm/dimm_devs.c
@@ -241,10 +241,7 @@ void nvdimm_drvdata_release(struct kref *kref)
nvdimm_free_dpa(ndd, res);
nvdimm_bus_unlock(dev);
- if (ndd->data && is_vmalloc_addr(ndd->data))
- vfree(ndd->data);
- else
- kfree(ndd->data);
+ kvfree(ndd->data);
kfree(ndd);
put_device(dev);
}
--
1.9.1
next reply other threads:[~2015-08-20 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 10:00 yalin wang [this message]
2015-08-20 17:49 ` [PATCH] nvdimm: change to use generic kvfree() Ross Zwisler
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=1440064809-26036-1-git-send-email-yalin.wang2010@gmail.com \
--to=yalin.wang2010@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
/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