mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
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>
This commit is contained in:
parent
5b1f5bc332
commit
4ba1e78891
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user