]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: do not strdup non existent strings
authorJosef Bacik <jbacik@fusionio.com>
Thu, 2 Aug 2012 14:23:59 +0000 (10:23 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 28 Aug 2012 20:53:29 +0000 (16:53 -0400)
commit76e6cecc9100c806d9a13dba5e13774c32ed698a
treea2b3037ad77b3841467d9e7ff4b0dde3ea2eb380
parent771a0cebec3c592dd4af0c8bc2491e5468769550
Btrfs: do not strdup non existent strings

When we close devices we add back empty devices for some reason that escapes
me.  In the case of a missing dev we don't allocate an rcu_string for it's
name, so check to see if the device has a name and if it doesn't don't
bother strdup()'ing it.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/volumes.c