name_to_dev_t() must not call __init code [Linux 2.6.37]

This Linux kernel change "name_to_dev_t() must not call __init code" is included in the Linux 2.6.37 release. This change is authored by Jan Beulich <JBeulich [at]> on Mon Jan 3 15:07:02 2011 +0000. The commit for this change in Linux stable tree is a1cf11d (patch).

name_to_dev_t() must not call __init code

The function can't be __init itself (being called from some sysfs
handler), and hence none of the functions it calls can be either.

Signed-off-by: Jan Beulich <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 init/do_mounts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 830aaec..2b54bef3 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -93,7 +93,7 @@ static int match_dev_by_uuid(struct device *dev, void *data)
  * Returns the matching dev_t on success or 0 on failure.
-static dev_t __init devt_from_partuuid(char *uuid_str)
+static dev_t devt_from_partuuid(char *uuid_str)
    dev_t res = 0;
    struct device *dev = NULL;

Leave a Reply

Your email address will not be published. Required fields are marked *