Skip to contentSkip to conversation

powerpc: Fix size of st_nlink on 64bit

PATCH In review Anton Blanchard 3 participants 5 messages Jun 2, 2012 – Jun 3, 2012 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix size of st_nlink on 64bit

commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures.

---

arch/powerpc/include/asm/stat.h +1 -1
Index: linux-build/arch/powerpc/include/asm/stat.h
===================================================================
@@ -30,7 +30,7 @@ struct stat {
 	unsigned long	st_dev;
 	ino_t		st_ino;
 #ifdef __powerpc64__
-	unsigned short	st_nlink;
+	unsigned long	st_nlink;
 	mode_t		st_mode;
 #else
 	mode_t		st_mode;
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Anton Blanchard

commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures.

Al, did you CC me on that ? I don't remember seeing it but it could be my fault...

Cheers,
Ben.

Quoted 15 lines

---

Index: linux-build/arch/powerpc/include/asm/stat.h
===================================================================

arch/powerpc/include/asm/stat.h +1 -1
@@ -30,7 +30,7 @@ struct stat {
 	unsigned long	st_dev;
 	ino_t		st_ino;
 #ifdef __powerpc64__
-	unsigned short	st_nlink;
+	unsigned long	st_nlink;
 	mode_t		st_mode;
 #else
 	mode_t		st_mode;
#2 lore raw
In reply to Anton Blanchard

Hi Anton,

Quoted 6 lines · On Sat, 2 Jun 2012 21:34:52 +1000 Anton Blanchard <[email protected]> wrote:

commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures.

Would this affect my (early user mode) boot problems reported yesterday;

/init: 71: mknod: Permission denied
/init: 88: mknod: Permission denied
/init: 88: mknod: Permission denied

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#3 lore raw

Hi Stephen,

Quoted 4 lines
Quoted 4 lines

commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures.

Quoted 8 lines
Quoted 1 line

Would this affect my (early user mode) boot problems reported yesterday;

/init: 71: mknod: Permission denied
/init: 88: mknod: Permission denied
/init: 88: mknod: Permission denied

Very similar to the errors I was seeing so I think the patch will fix it.

Anton

#4 lore raw

Hi Anton,

Quoted 10 lines · On Sun, 3 Jun 2012 13:48:36 +1000 Anton Blanchard <[email protected]> wrote:
Quoted 10 lines
Quoted 6 lines

commit e57f93cc53b7 (powerpc: get rid of nlink_t uses, switch to explicitly-sized type) changed the size of st_nlink on ppc64 from a long to a short, resulting in boot failures.

Would this affect my (early user mode) boot problems reported yesterday;

Quoted 6 lines
Quoted 3 lines

/init: 71: mknod: Permission denied
/init: 88: mknod: Permission denied
/init: 88: mknod: Permission denied

Very similar to the errors I was seeing so I think the patch will fix it.

Great. One less thing to bisect tomorrow :-)

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]