* [PATCH] md: remove an unneeded condition in set_array_info.
@ 2015-06-23 10:44 Wei Fang
0 siblings, 0 replies; only message in thread
From: Wei Fang @ 2015-06-23 10:44 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid
if ->major_version is legal, name can't be NULL, so remove it.
Signed-off-by: Wei Fang <fangwei1@huawei.com>
---
drivers/md/md.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index d4f31e1..1c2f967 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6193,12 +6193,10 @@ static int set_bitmap_file(struct mddev *mddev, int fd)
*/
static int set_array_info(struct mddev *mddev, mdu_array_info_t *info)
{
-
if (info->raid_disks == 0) {
/* just setting version number for superblock loading */
if (info->major_version < 0 ||
- info->major_version >= ARRAY_SIZE(super_types) ||
- super_types[info->major_version].name == NULL) {
+ info->major_version >= ARRAY_SIZE(super_types)) {
/* maybe try to auto-load a module? */
printk(KERN_INFO
"md: superblock version %d not known\n",
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-23 10:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 10:44 [PATCH] md: remove an unneeded condition in set_array_info Wei Fang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.