aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-ioctl.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-08-17 22:56:07 -0700
committerDave Jones <davej@redhat.com>2005-08-17 22:56:07 -0700
commita8b3e6f10f08f66ae1072efd087b30966a3654f6 (patch)
tree1d1409855f8ad5beabafe061c6453edd84ba94c8 /drivers/md/dm-ioctl.c
parent46acac3b4fd8ef66eec63b51de8d556a17c7d4f7 (diff)
parent099d44e869f1886b5eb02a5145ca97b5e4142e28 (diff)
downloadkernel_samsung_smdk4412-a8b3e6f10f08f66ae1072efd087b30966a3654f6.zip
kernel_samsung_smdk4412-a8b3e6f10f08f66ae1072efd087b30966a3654f6.tar.gz
kernel_samsung_smdk4412-a8b3e6f10f08f66ae1072efd087b30966a3654f6.tar.bz2
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-rw-r--r--drivers/md/dm-ioctl.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index ee3c869..200a068 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -122,14 +122,6 @@ static struct hash_cell *__get_uuid_cell(const char *str)
/*-----------------------------------------------------------------
* Inserting, removing and renaming a device.
*---------------------------------------------------------------*/
-static inline char *kstrdup(const char *str)
-{
- char *r = kmalloc(strlen(str) + 1, GFP_KERNEL);
- if (r)
- strcpy(r, str);
- return r;
-}
-
static struct hash_cell *alloc_cell(const char *name, const char *uuid,
struct mapped_device *md)
{
@@ -139,7 +131,7 @@ static struct hash_cell *alloc_cell(const char *name, const char *uuid,
if (!hc)
return NULL;
- hc->name = kstrdup(name);
+ hc->name = kstrdup(name, GFP_KERNEL);
if (!hc->name) {
kfree(hc);
return NULL;
@@ -149,7 +141,7 @@ static struct hash_cell *alloc_cell(const char *name, const char *uuid,
hc->uuid = NULL;
else {
- hc->uuid = kstrdup(uuid);
+ hc->uuid = kstrdup(uuid, GFP_KERNEL);
if (!hc->uuid) {
kfree(hc->name);
kfree(hc);
@@ -273,7 +265,7 @@ static int dm_hash_rename(const char *old, const char *new)
/*
* duplicate new.
*/
- new_name = kstrdup(new);
+ new_name = kstrdup(new, GFP_KERNEL);
if (!new_name)
return -ENOMEM;