[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150423042625.GD724@swordfish>
Date: Thu, 23 Apr 2015 13:26:25 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Nitin Gupta <ngupta@...are.org>, linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCHv2 04/10] zram: factor out device reset from reset_store()
On (04/23/15 11:29), Minchan Kim wrote:
> On Thu, Apr 16, 2015 at 08:55:50PM +0900, Sergey Senozhatsky wrote:
> > Device reset currently includes two steps:
> > a) holding ->bd_mutex we ensure that there are no device users
> > (bdev->bd_openers)
> >
> > b) and "internal" part (executed under bdev->bd_mutex and partially
> > under zram->init_lock) that resets the device - frees allocated
> > memory and returns the device back to its initial state.
> >
> > Up until now it worked just fine. But there will be yet another device
> > reset user soon -- on-demand device removal. We currently can reuse (b),
> > but step (a) is done in sysfs ATTR reset_store() handler, which makes it
> > hard to use it in on-demand device reset path.
> >
> > Rename step (b) from zram_reset_device() to zram_reset_device_internal()
>
> Usually, we use double underbar to show interal function so I prefer
> __zram_reset_device to xxx_internal.
>
yes. I do remember your comment regarding the function name from the first
submission. it's already in the new patchset. thanks.
/* along with two additional comment styles clean ups. */
-ss
> > and factor out step (a) to zram_reset_device().
> >
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> Acked-by: Minchan Kim <minchan@...nel.org>
>
> --
> Kind regards,
> Minchan Kim
>
--
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