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,6 +4186,7 @@ size_store(struct mddev *mddev, const char *buf, size_t len) ...@@ -4186,6 +4186,7 @@ size_store(struct mddev *mddev, const char *buf, size_t len)
return err; return err;
if (mddev->pers) { if (mddev->pers) {
err = update_size(mddev, sectors); err = update_size(mddev, sectors);
if (err == 0)
md_update_sb(mddev, 1); md_update_sb(mddev, 1);
} else { } else {
if (mddev->dev_sectors == 0 || if (mddev->dev_sectors == 0 ||
......
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