[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150128150424.GC965@swordfish>
Date: Thu, 29 Jan 2015 00:04:24 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Nitin Gupta <ngupta@...are.org>,
Jerome Marchand <jmarchan@...hat.com>,
Ganesh Mahendran <opensource.ganesh@...il.com>,
sergey.senozhatsky.work@...il.com
Subject: Re: [PATCH v1 2/2] zram: remove init_lock in zram_make_request
On (01/28/15 23:56), Sergey Senozhatsky wrote:
> > -static inline int init_done(struct zram *zram)
> > +static inline bool init_done(struct zram *zram)
> > {
> > - return zram->meta != NULL;
> > + /*
> > + * init_done can be used without holding zram->init_lock in
> > + * read/write handler(ie, zram_make_request) but we should make sure
> > + * that zram->init_done should set up after meta initialization is
> > + * done. Look at setup_init_done.
> > + */
> > + bool ret = zram->init_done;
>
> I don't like re-introduced ->init_done.
> another idea... how about using `zram->disksize == 0' instead of
> `->init_done' (previously `->meta != NULL')? should do the trick.
>
a typo, I meant `->disksize != 0'.
-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