diff options
author | Xiao Ni <xni@redhat.com> | 2016-06-12 17:18:00 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-06-13 11:54:11 -0700 |
commit | 4ba1e78891e9858a5c773e6ffe4414611019bf42 (patch) | |
tree | 13016219006a673227ec0e11bc2386f9ec728e03 /drivers/md/md.c | |
parent | 5b1f5bc3323ece3726206a46ce64a92ace2c8df8 (diff) |
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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 43728a42fccf..d0c1e79da49e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -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) |