summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorXiao Ni <xni@redhat.com>2016-06-12 17:18:00 +0800
committerShaohua Li <shli@fb.com>2016-06-13 11:54:11 -0700
commit4ba1e78891e9858a5c773e6ffe4414611019bf42 (patch)
tree13016219006a673227ec0e11bc2386f9ec728e03 /drivers/md
parent5b1f5bc3323ece3726206a46ce64a92ace2c8df8 (diff)
downloadop-kernel-dev-4ba1e78891e9858a5c773e6ffe4414611019bf42.zip
op-kernel-dev-4ba1e78891e9858a5c773e6ffe4414611019bf42.tar.gz
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')
-rw-r--r--drivers/md/md.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 43728a4..d0c1e79 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)
OpenPOWER on IntegriCloud