提交 4cb9da7d 编写于 作者: A Alexey Obitotskiy 提交者: Shaohua Li

Fix kernel module refcount handling

md loads raidX modules and increments module refcount each time level
has changed but does not decrement it. You are unable to unload raid0
module after reshape because raid0 reshape changes level to raid4
and back to raid0.
Signed-off-by: NAleksey Obitotskiy <aleksey.obitotskiy@intel.com>
Signed-off-by: NShaohua Li <shli@fb.com>
上级 0e3ef49e
......@@ -3579,6 +3579,8 @@ level_store(struct mddev *mddev, const char *buf, size_t len)
mddev->to_remove = &md_redundancy_group;
}
module_put(oldpers->owner);
rdev_for_each(rdev, mddev) {
if (rdev->raid_disk < 0)
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册