1
0
Fork 0

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: Xiao Ni <xni@redhat.com>
Signed-off-by: Shaohua Li <shli@fb.com>
steinar/wifi_calib_4_9_kernel
Xiao Ni 2016-06-12 17:18:00 +08:00 committed by Shaohua Li
parent 5b1f5bc332
commit 4ba1e78891
1 changed files with 2 additions and 1 deletions

View File

@ -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)