Re: [PATCH 1/4] stringbuf: A string buffer implementation

Pekka Enberg
2007-10-26T12:05:39Z

Hi,

On 10/24/07, Matthew Wilcox <matthew@wil.cx> wrote:
> +static void sb_vprintf(struct stringbuf *sb, const char *format, va_list args)
> +{
> + char *s;
> + int size;
> +
> + if (sb->alloc == -ENOMEM)
> + return;
> + if (sb->alloc == 0) {
> + sb->s = kmalloc(INITIAL_SIZE, GFP_ATOMIC);

How about putting ->gfp_flags to struct stringbuf and initializing
that in sb_init() instead of hard-coding to GFP_ATOMIC here?

Btw, the "sb" abbrevation is already used for "superblock". Perhaps we
could use "str" for these?

Pekka