Re: [PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-02-26 Thread Coly Li
On 2019/2/26 6:01 下午, Geliang Tang wrote: > On Wed, Feb 06, 2019 at 04:37:36PM +0800, Coly Li wrote: >> On 2019/1/30 5:29 下午, Geliang Tang wrote: >>> 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 mo

Re: [PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-02-26 Thread Geliang Tang
On Wed, Feb 06, 2019 at 04:37:36PM +0800, Coly Li wrote: > On 2019/1/30 5:29 下午, Geliang Tang wrote: > > 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

Re: [PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-02-06 Thread Coly Li
On 2019/1/30 5:29 下午, Geliang Tang wrote: > 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 Hi Ge

[PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-01-30 Thread Geliang Tang
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 --- drivers/md/bcache/super.c | 10 -- 1 file changed