commit | 792732d9852c0e4505aceff4631ea2168fd02480 | [log] [tgz] |
---|---|---|
author | Geliang Tang <geliangtang@gmail.com> | Thu Apr 25 00:48:29 2019 +0800 |
committer | Jens Axboe <axboe@kernel.dk> | Wed Apr 24 10:56:27 2019 -0600 |
tree | 4dea3d30ac952c2a31d80fc4064ab724c13e5d5a | |
parent | 78d4eb8ad9e1d413449d1b7a060f50b6efa81ebd [diff] |
bcache: use kmemdup_nul for CACHED_LABEL buffer This patch uses kmemdup_nul to create a NUL-terminated string from dc->sb.label. This is better than open coding it. With this, we can move env[2] initialization into env[] array to make code more elegant. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>