Re: [PATCH] zram: cut the trailing new-line in algorithm name

From: Sergey Senozhatsky
Date: Fri May 22 2015 - 09:08:48 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/