From: Xiao Ni <xni@redhat.com>
To: shli@kernel.org
Cc: linux-raid@vger.kernel.org
Subject: [PATCH 1/1] MD:Update superblock when err == 0 in size_store
Date: Sun, 12 Jun 2016 17:18:00 +0800 [thread overview]
Message-ID: <1465723080-9375-1-git-send-email-xni@redhat.com> (raw)
Hi
This is a simple check before updating the superblock. It should update
the superblock when update_size return 0.
Regards
Xiao
---
drivers/md/md.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index c068f17..0332a13 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4181,7 +4181,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)
--
2.4.3
next reply other threads:[~2016-06-12 9:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 9:18 Xiao Ni [this message]
2016-06-13 18:47 ` [PATCH 1/1] MD:Update superblock when err == 0 in size_store Shaohua Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465723080-9375-1-git-send-email-xni@redhat.com \
--to=xni@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=shli@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.