Skip to content

Commit

Permalink
init: export name_to_dev_t and mark name argument as const
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Ehrenberg authored and snitm committed Apr 15, 2015
1 parent 17e149b commit e6e20a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
3 changes: 2 additions & 1 deletion init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static dev_t devt_from_partuuid(const char *uuid_str)
* bangs.
*/

dev_t name_to_dev_t(char *name)
dev_t name_to_dev_t(const char *name)
{
char s[32];
char *p;
Expand Down Expand Up @@ -286,6 +286,7 @@ dev_t name_to_dev_t(char *name)
done:
return res;
}
EXPORT_SYMBOL_GPL(name_to_dev_t);

static int __init root_dev_setup(char *line)
{
Expand Down

0 comments on commit e6e20a7

Please sign in to comment.