Skip to content

Commit e6e20a7

Browse files
Dan Ehrenbergsnitm
authored andcommitted
init: export name_to_dev_t and mark name argument as const
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 <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 17e149b commit e6e20a7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/linux/mount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
9292
extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
9393
extern void mark_mounts_for_expiry(struct list_head *mounts);
9494

95-
extern dev_t name_to_dev_t(char *name);
95+
extern dev_t name_to_dev_t(const char *name);
9696

9797
#endif /* _LINUX_MOUNT_H */

init/do_mounts.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static dev_t devt_from_partuuid(const char *uuid_str)
207207
* bangs.
208208
*/
209209

210-
dev_t name_to_dev_t(char *name)
210+
dev_t name_to_dev_t(const char *name)
211211
{
212212
char s[32];
213213
char *p;
@@ -286,6 +286,7 @@ dev_t name_to_dev_t(char *name)
286286
done:
287287
return res;
288288
}
289+
EXPORT_SYMBOL_GPL(name_to_dev_t);
289290

290291
static int __init root_dev_setup(char *line)
291292
{

0 commit comments

Comments
 (0)