All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] MD:Update superblock when err == 0 in size_store
@ 2016-06-12  9:18 Xiao Ni
  2016-06-13 18:47 ` Shaohua Li
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Ni @ 2016-06-12  9:18 UTC (permalink / raw)
  To: shli; +Cc: linux-raid

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] MD:Update superblock when err == 0 in size_store
  2016-06-12  9:18 [PATCH 1/1] MD:Update superblock when err == 0 in size_store Xiao Ni
@ 2016-06-13 18:47 ` Shaohua Li
  0 siblings, 0 replies; 2+ messages in thread
From: Shaohua Li @ 2016-06-13 18:47 UTC (permalink / raw)
  To: Xiao Ni; +Cc: linux-raid

On Sun, Jun 12, 2016 at 05:18:00PM +0800, Xiao Ni wrote:
> Hi
> 
> This is a simple check before updating the superblock. It should update
> the superblock when update_size return 0.

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-13 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-12  9:18 [PATCH 1/1] MD:Update superblock when err == 0 in size_store Xiao Ni
2016-06-13 18:47 ` Shaohua Li

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.