diff options
| -rw-r--r-- | init/initramfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 679d870d991b..f81cfa40a719 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
| @@ -26,10 +26,12 @@ static void __init free(void *where) | |||
| 26 | 26 | ||
| 27 | /* link hash */ | 27 | /* link hash */ |
| 28 | 28 | ||
| 29 | #define N_ALIGN(len) ((((len) + 1) & ~3) + 2) | ||
| 30 | |||
| 29 | static __initdata struct hash { | 31 | static __initdata struct hash { |
| 30 | int ino, minor, major; | 32 | int ino, minor, major; |
| 31 | struct hash *next; | 33 | struct hash *next; |
| 32 | char *name; | 34 | char name[N_ALIGN(PATH_MAX)]; |
| 33 | } *head[32]; | 35 | } *head[32]; |
| 34 | 36 | ||
| 35 | static inline int hash(int major, int minor, int ino) | 37 | static inline int hash(int major, int minor, int ino) |
| @@ -57,7 +59,7 @@ static char __init *find_link(int major, int minor, int ino, char *name) | |||
| 57 | q->ino = ino; | 59 | q->ino = ino; |
| 58 | q->minor = minor; | 60 | q->minor = minor; |
| 59 | q->major = major; | 61 | q->major = major; |
| 60 | q->name = name; | 62 | strcpy(q->name, name); |
| 61 | q->next = NULL; | 63 | q->next = NULL; |
| 62 | *p = q; | 64 | *p = q; |
| 63 | return NULL; | 65 | return NULL; |
| @@ -133,8 +135,6 @@ static inline void eat(unsigned n) | |||
| 133 | count -= n; | 135 | count -= n; |
| 134 | } | 136 | } |
| 135 | 137 | ||
| 136 | #define N_ALIGN(len) ((((len) + 1) & ~3) + 2) | ||
| 137 | |||
| 138 | static __initdata char *collected; | 138 | static __initdata char *collected; |
| 139 | static __initdata int remains; | 139 | static __initdata int remains; |
| 140 | static __initdata char *collect; | 140 | static __initdata char *collect; |
