From: Peng Wang <rocking@whu.edu.cn>
To: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com
Cc: linux-kernel@vger.kernel.org, Peng Wang <rocking@whu.edu.cn>
Subject: [PATCH] dm: initialize md->dax_dev only with CONFIG_DAX_DRIVER enabled
Date: Thu, 18 Apr 2019 21:59:19 +0800 [thread overview]
Message-ID: <20190418135919.10754-1-rocking@whu.edu.cn> (raw)
md->dax_dev is NULL default and there is no need to process it
without CONFIG_DAX_DRIVER configured.
Signed-off-by: Peng Wang <rocking@whu.edu.cn>
---
drivers/md/dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 043f0761e4a0..418a51cf194c 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1972,8 +1972,8 @@ static struct mapped_device *alloc_dev(int minor)
dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops);
if (!dax_dev)
goto bad;
+ md->dax_dev = dax_dev;
}
- md->dax_dev = dax_dev;
add_disk_no_queue_reg(md->disk);
format_dev_t(md->name, MKDEV(_major, minor));
--
2.19.1
reply other threads:[~2019-04-18 14:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190418135919.10754-1-rocking@whu.edu.cn \
--to=rocking@whu.edu.cn \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.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).