From: Jerome Marchand <jmarchan@redhat.com>
To: Minchan Kim <minchan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Nitin Gupta <ngupta@vflare.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH 1/2] zram: free meta out of init_lock
Date: Fri, 23 Jan 2015 14:07:38 +0100 [thread overview]
Message-ID: <54C2479A.3080307@redhat.com> (raw)
In-Reply-To: <1421992707-32658-1-git-send-email-minchan@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]
On 01/23/2015 06:58 AM, Minchan Kim wrote:
> We don't need to call zram_meta_free, zcomp_destroy and zs_free
> under init_lock. What we need to prevent race with init_lock
> in reset is setting NULL into zram->meta (ie, init_done).
> This patch does it.
>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
On a side note, when zram->meta replaced init_done, no comment was
added in zram structure to explain that. Things could be made more
explicit.
---
Subject: [PATCH] zram: explicitely state that zram->meta is used to determine
the init state
zram->meta is used to determine the initialization state of a zram structure.
This patch adds a comment to zram structure to make this clear.
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
---
drivers/block/zram/zram_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index b05a816..551569a 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -99,7 +99,7 @@ struct zram_meta {
};
struct zram {
- struct zram_meta *meta;
+ struct zram_meta *meta; /* also used to determine the init state */
struct request_queue *queue;
struct gendisk *disk;
struct zcomp *comp;
--
1.9.3
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-01-23 13:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 5:58 [PATCH 1/2] zram: free meta out of init_lock Minchan Kim
2015-01-23 5:58 ` [PATCH 2/2] zram: protect zram->stat race with init_lock Minchan Kim
2015-01-23 13:45 ` Jerome Marchand
2015-01-23 14:38 ` Sergey Senozhatsky
2015-01-24 13:17 ` Ganesh Mahendran
2015-01-25 14:38 ` Sergey Senozhatsky
2015-01-23 13:07 ` Jerome Marchand [this message]
2015-01-23 14:24 ` [PATCH 1/2] zram: free meta out of init_lock Sergey Senozhatsky
2015-01-23 14:48 ` Jerome Marchand
2015-01-23 15:47 ` Sergey Senozhatsky
2015-01-26 1:33 ` Minchan Kim
2015-01-26 14:17 ` Sergey Senozhatsky
2015-01-26 16:00 ` Minchan Kim
2015-01-27 2:17 ` Sergey Senozhatsky
2015-01-27 3:18 ` Minchan Kim
2015-01-27 4:03 ` Sergey Senozhatsky
2015-01-28 0:15 ` Minchan Kim
2015-01-28 0:22 ` Minchan Kim
2015-01-28 2:07 ` Sergey Senozhatsky
2015-01-28 2:57 ` Minchan Kim
2015-01-28 3:53 ` Sergey Senozhatsky
2015-01-28 4:07 ` Sergey Senozhatsky
2015-01-28 4:50 ` Sergey Senozhatsky
2015-01-28 4:58 ` Minchan Kim
2015-01-28 5:35 ` Minchan Kim
2015-01-28 6:08 ` Sergey Senozhatsky
2015-01-28 6:10 ` Sergey Senozhatsky
2015-01-28 4:55 ` Minchan Kim
2015-01-28 0:24 ` Sergey Senozhatsky
2015-01-28 0:59 ` Minchan Kim
2015-01-26 14:34 ` Jerome Marchand
2015-01-26 15:52 ` Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C2479A.3080307@redhat.com \
--to=jmarchan@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).