From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: NeilBrown <neilb@suse.com>, Shaohua Li <shli@fb.com>
Cc: Kirill Tkhai <ktkhai@virtuozzo.com>,
linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: md: dead code in md_alloc()
Date: Thu, 20 Sep 2018 19:03:57 +0300 [thread overview]
Message-ID: <3003e71d-ede0-0d55-973d-47c1c06e05ba@virtuozzo.com> (raw)
Hi,
Kirill noticed that the following piece of code from md_alloc(dev, name)
is dead:
if (name && dev)
/*
* Creating /dev/mdNNN via "newarray", so adjust hold_active.
*/
mddev->hold_active = UNTIL_STOP;
md_alloc() is always called with either dev == 0 or name == NULL.
Judging from the commit that added this code:
039b7225e6e98783a7a7e79c52b29c437f29967d
Author: NeilBrown <neilb@suse.com>
Date: Wed Apr 12 16:26:13 2017 +1000
md: allow creation of mdNNN arrays via md_mod/parameters/new_array
and from the comment, it seems should be "if (!name && dev)".
But that would also change ->hold_active for created-by-open md devices,
and I'm not sure whether that would be a desirable change or not.
reply other threads:[~2018-09-20 16:03 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=3003e71d-ede0-0d55-973d-47c1c06e05ba@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=shli@fb.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
all inboxes | Powered by JetHome®