[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150522130901.GB3793@swordfish>
Date: Fri, 22 May 2015 22:09:01 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>, linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists