lkml.org 
[lkml]   [2015]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] zram: cut the trailing new-line in algorithm name
On (05/22/15 18:34), Sergey Senozhatsky wrote:
[..]
> down_write(&zram->init_lock);
> if (init_done(zram)) {
> up_write(&zram->init_lock);
> @@ -371,6 +378,11 @@ static ssize_t comp_algorithm_store(struct device *dev,
> }
> strlcpy(zram->compressor, buf, sizeof(zram->compressor));
> up_write(&zram->init_lock);
> +
> + /* cut the trailing new-line */
> + sz = strlen(zram->compressor) - 1;
> + if (zram->compressor[sz] == '\n')
> + zram->compressor[sz] = 0x00;

oh, how did it escape from the ->init_lock scope... will resend. sorry.

-ss



\
 
 \ /
  Last update: 2015-05-22 15:21    [W:0.045 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site