[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230803132930.2742286-6-yukuai1@huaweicloud.com>
Date: Thu, 3 Aug 2023 21:29:06 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: song@...nel.org, xni@...hat.com
Cc: linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
yukuai3@...wei.com, yukuai1@...weicloud.com, yi.zhang@...wei.com,
yangerkun@...wei.com
Subject: [PATCH -next 05/29] md: use new apis to suspend array for suspend_lo/hi/store()
From: Yu Kuai <yukuai3@...wei.com>
Convert to use new apis, the old apis will be removed eventually.
Signed-off-by: Yu Kuai <yukuai3@...wei.com>
---
drivers/md/md.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 3c98f253b980..e516c5000a00 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5271,15 +5271,10 @@ suspend_lo_store(struct mddev *mddev, const char *buf, size_t len)
if (new != (sector_t)new)
return -EINVAL;
- err = mddev_lock(mddev);
- if (err)
- return err;
-
- mddev_suspend(mddev);
+ __mddev_suspend(mddev);
WRITE_ONCE(mddev->suspend_lo, new);
- mddev_resume(mddev);
+ __mddev_resume(mddev);
- mddev_unlock(mddev);
return len;
}
static struct md_sysfs_entry md_suspend_lo =
@@ -5304,15 +5299,10 @@ suspend_hi_store(struct mddev *mddev, const char *buf, size_t len)
if (new != (sector_t)new)
return -EINVAL;
- err = mddev_lock(mddev);
- if (err)
- return err;
-
- mddev_suspend(mddev);
+ __mddev_suspend(mddev);
WRITE_ONCE(mddev->suspend_hi, new);
- mddev_resume(mddev);
+ __mddev_resume(mddev);
- mddev_unlock(mddev);
return len;
}
static struct md_sysfs_entry md_suspend_hi =
--
2.39.2
Powered by blists - more mailing lists