[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3003e71d-ede0-0d55-973d-47c1c06e05ba@virtuozzo.com>
Date: Thu, 20 Sep 2018 19:03:57 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: NeilBrown <neilb@...e.com>, Shaohua Li <shli@...com>
Cc: Kirill Tkhai <ktkhai@...tuozzo.com>, linux-raid@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: md: dead code in md_alloc()
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@...e.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.
Powered by blists - more mailing lists