summaryrefslogtreecommitdiff
path: root/drivers/md/md-bitmap.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-08-26 10:44:23 +0300
committerSong Liu <song@kernel.org>2024-08-27 20:14:15 +0300
commit04c80e649512f2c24f99052440cc808163eff40c (patch)
tree499fbd96156f85c3844f1da2cabfebb30866039b /drivers/md/md-bitmap.c
parent7545d385ec7e4c0d5e86e7cde4fe3fb8f4555fb9 (diff)
downloadlinux-04c80e649512f2c24f99052440cc808163eff40c.tar.xz
md/md-bitmap: merge md_bitmap_create() into bitmap_operations
So that the implementation won't be exposed, and it'll be possible to invent a new bitmap by replacing bitmap_operations. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20240826074452.1490072-14-yukuai1@huaweicloud.com Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md/md-bitmap.c')
-rw-r--r--drivers/md/md-bitmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 2f3ff8e64121..c534382f0b57 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -1966,7 +1966,7 @@ static struct bitmap *__bitmap_create(struct mddev *mddev, int slot)
return ERR_PTR(err);
}
-int md_bitmap_create(struct mddev *mddev, int slot)
+static int bitmap_create(struct mddev *mddev, int slot)
{
struct bitmap *bitmap = __bitmap_create(mddev, slot);
@@ -2421,7 +2421,7 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
}
mddev->bitmap_info.offset = offset;
- rv = md_bitmap_create(mddev, -1);
+ rv = bitmap_create(mddev, -1);
if (rv)
goto out;
@@ -2723,6 +2723,7 @@ const struct attribute_group md_bitmap_group = {
};
static struct bitmap_operations bitmap_ops = {
+ .create = bitmap_create,
};
void mddev_set_bitmap_ops(struct mddev *mddev)