summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkpg.h6
-rw-r--r--include/linux/raid/md.h15
2 files changed, 13 insertions, 8 deletions
diff --git a/include/linux/blkpg.h b/include/linux/blkpg.h
index 571618972e30..15b61f7bf0b5 100644
--- a/include/linux/blkpg.h
+++ b/include/linux/blkpg.h
@@ -54,10 +54,4 @@ struct blkpg_partition {
char volname[BLKPG_VOLNAMELTH]; /* volume label */
};
-#ifdef __KERNEL__
-
-extern char * partition_name(dev_t dev);
-
-#endif /* __KERNEL__ */
-
#endif /* _LINUX_BLKPG_H */
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index 02ff30e5a187..98f0d1e27c4c 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -61,9 +61,20 @@
#define MD_MINOR_VERSION 90
#define MD_PATCHLEVEL_VERSION 0
-extern inline char * bdev_partition_name (struct block_device *bdev)
+/*
+ * XXX(hch): This function is broken. Someone who understands the md
+ * code needs to go through all callers, check whether bdev could
+ * be NULL and replace it with direct calls to bdevmame.
+ *
+ * This would also fix the returns buffer on stack issue nicely :)
+ */
+static inline const char *bdev_partition_name (struct block_device *bdev)
{
- return partition_name(bdev ? bdev->bd_dev : 0);
+ char b[BDEVNAME_SIZE];
+
+ if (!bdev)
+ return __bdevname(0, b);
+ return bdevname(bdev, b);
}
extern int register_md_personality (int p_num, mdk_personality_t *p);
extern int unregister_md_personality (int p_num);