Commit 168b305b authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by Jens Axboe

md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show

Commit c42d3240
("md: return -ENODEV if rdev has no mddev assigned") changed
rdev_attr_store to return -ENODEV when rdev->mddev is NULL, now do the
same to rdev_attr_show.
Signed-off-by: Marcos Paulo de Souza's avatarMarcos Paulo de Souza <>
Signed-off-by: default avatarSong Liu <>
Signed-off-by: default avatarJens Axboe <>
parent d9771f5e
......@@ -3356,7 +3356,7 @@ rdev_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
if (!entry->show)
return -EIO;
if (!rdev->mddev)
return -EBUSY;
return -ENODEV;
return entry->show(rdev, page);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment