Commit 4ba1e788 authored by Xiao Ni's avatar Xiao Ni Committed by 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: default avatarXiao Ni <xni@redhat.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment