init: export name_to_dev_t and mark name argument as const
authorDan Ehrenberg <dehrenberg@chromium.org>
Tue, 10 Feb 2015 23:20:49 +0000 (15:20 -0800)
committerMike Snitzer <snitzer@redhat.com>
Wed, 15 Apr 2015 16:10:18 +0000 (12:10 -0400)
DM will switch its device lookup code to using name_to_dev_t() so it
must be exported.  Also, the @name argument should be marked const.

Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
include/linux/mount.h
init/do_mounts.c

index c2c561dc011440ee83f395aba0a226ab467204a0..bca086d62b1a745f9a4ddfe12670139d9ce228d4 100644 (file)
@@ -92,6 +92,6 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
 extern void mark_mounts_for_expiry(struct list_head *mounts);
 
-extern dev_t name_to_dev_t(char *name);
+extern dev_t name_to_dev_t(const char *name);
 
 #endif /* _LINUX_MOUNT_H */
index eb410083e8e075f9ca1829d0db1bf3cb70d17139..c16adfbe4ad65a09eaea6e55bb3cbf370743aa9c 100644 (file)
@@ -207,7 +207,7 @@ done:
  *     bangs.
  */
 
-dev_t name_to_dev_t(char *name)
+dev_t name_to_dev_t(const char *name)
 {
        char s[32];
        char *p;
@@ -286,6 +286,7 @@ fail:
 done:
        return res;
 }
+EXPORT_SYMBOL_GPL(name_to_dev_t);
 
 static int __init root_dev_setup(char *line)
 {