All of lore.kernel.org
 help / color / mirror / Atom feed
* openpromfs root inode has ino 0
@ 2016-07-17 12:29 ` Vegard Nossum
  0 siblings, 0 replies; 2+ messages in thread
From: Vegard Nossum @ 2016-07-17 12:29 UTC (permalink / raw)
  To: David S. Miller; +Cc: Al Viro, sparclinux, linux-fsdevel

Hi,

I noticed that fs/openpromfs/inode.c has:

#define OPENPROM_ROOT_INO  0

It seems it was originally 16 but was changed to 0 here:

commit 3d824a46b7210ea3b0a13ab0d0fbd7f6e2e91ddf
Author: David S. Miller <davem@davemloft.net>
Date:   Sun Jun 25 23:19:14 2006 -0700

     [OPENPROMFS]: Rewrite using in-kernel device tree and seq_file.

As far as I understand, inode 0 should never be used and can cause
various things to fail, e.g. my /bin/ls seems to completely ignore
getdents() results which have ->d_ino = 0.

I don't know if it actually causes any problems for people who are
actually using this, and I don't have the means to test the code anyway,
so just a heads up...


Vegard

^ permalink raw reply	[flat|nested] 2+ messages in thread

* openpromfs root inode has ino 0
@ 2016-07-17 12:29 ` Vegard Nossum
  0 siblings, 0 replies; 2+ messages in thread
From: Vegard Nossum @ 2016-07-17 12:29 UTC (permalink / raw)
  To: David S. Miller; +Cc: Al Viro, sparclinux, linux-fsdevel

Hi,

I noticed that fs/openpromfs/inode.c has:

#define OPENPROM_ROOT_INO  0

It seems it was originally 16 but was changed to 0 here:

commit 3d824a46b7210ea3b0a13ab0d0fbd7f6e2e91ddf
Author: David S. Miller <davem@davemloft.net>
Date:   Sun Jun 25 23:19:14 2006 -0700

     [OPENPROMFS]: Rewrite using in-kernel device tree and seq_file.

As far as I understand, inode 0 should never be used and can cause
various things to fail, e.g. my /bin/ls seems to completely ignore
getdents() results which have ->d_ino = 0.

I don't know if it actually causes any problems for people who are
actually using this, and I don't have the means to test the code anyway,
so just a heads up...


Vegard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-17 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-17 12:29 openpromfs root inode has ino 0 Vegard Nossum
2016-07-17 12:29 ` Vegard Nossum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.