Commit 197fd5ca authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Kleber Sacilotto de Souza

md: Avoid namespace collision with bitmap API

BugLink: https://bugs.launchpad.net/bugs/1864773

commit e64e4018 upstream.

bitmap API (include/linux/bitmap.h) has 'bitmap' prefix for its methods.

On the other hand MD bitmap API is special case.
Adding 'md' prefix to it to avoid name space collision.

No functional changes intended.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarShaohua Li <shli@kernel.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
[only take the bitmap_free change for stable - gregkh]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 2646c1b2
...@@ -1671,7 +1671,7 @@ void bitmap_flush(struct mddev *mddev) ...@@ -1671,7 +1671,7 @@ void bitmap_flush(struct mddev *mddev)
/* /*
* free memory that was allocated * free memory that was allocated
*/ */
static void bitmap_free(struct bitmap *bitmap) static void md_bitmap_free(struct bitmap *bitmap)
{ {
unsigned long k, pages; unsigned long k, pages;
struct bitmap_page *bp; struct bitmap_page *bp;
...@@ -1721,7 +1721,7 @@ void bitmap_destroy(struct mddev *mddev) ...@@ -1721,7 +1721,7 @@ void bitmap_destroy(struct mddev *mddev)
if (bitmap->sysfs_can_clear) if (bitmap->sysfs_can_clear)
sysfs_put(bitmap->sysfs_can_clear); sysfs_put(bitmap->sysfs_can_clear);
bitmap_free(bitmap); md_bitmap_free(bitmap);
} }
/* /*
...@@ -1805,7 +1805,7 @@ struct bitmap *bitmap_create(struct mddev *mddev, int slot) ...@@ -1805,7 +1805,7 @@ struct bitmap *bitmap_create(struct mddev *mddev, int slot)
return bitmap; return bitmap;
error: error:
bitmap_free(bitmap); md_bitmap_free(bitmap);
return ERR_PTR(err); return ERR_PTR(err);
} }
...@@ -1904,7 +1904,7 @@ int bitmap_copy_from_slot(struct mddev *mddev, int slot, ...@@ -1904,7 +1904,7 @@ int bitmap_copy_from_slot(struct mddev *mddev, int slot,
*low = lo; *low = lo;
*high = hi; *high = hi;
err: err:
bitmap_free(bitmap); md_bitmap_free(bitmap);
return rv; return rv;
} }
EXPORT_SYMBOL_GPL(bitmap_copy_from_slot); EXPORT_SYMBOL_GPL(bitmap_copy_from_slot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment