提交 4ba1e788 编写于 作者: X Xiao Ni 提交者: Shaohua Li

MD:Update superblock when err == 0 in size_store

This is a simple check before updating the superblock. It should update
the superblock when update_size return 0.
Signed-off-by: NXiao Ni <xni@redhat.com>
Signed-off-by: NShaohua Li <shli@fb.com>
上级 5b1f5bc3
......@@ -4186,7 +4186,8 @@ size_store(struct mddev *mddev, const char *buf, size_t len)
return err;
if (mddev->pers) {
err = update_size(mddev, sectors);
md_update_sb(mddev, 1);
if (err == 0)
md_update_sb(mddev, 1);
} else {
if (mddev->dev_sectors == 0 ||
mddev->dev_sectors > sectors)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册