Messages in this thread | | | Date | Tue, 28 Oct 2003 00:20:25 +0000 | From | viro@parcelfa ... | Subject | Re: inode->i_rdev not initialized in 2.4 fs/inode.c, only in 2.6? |
| |
On Tue, Oct 28, 2003 at 01:45:14AM +0200, Iustin Pop wrote: > Hello, > > I'm running 2.4.22 (with XFS and skas patch), but these patches do not > affect the code in question. /proc/version = Linux version 2.4.22-xfs > (root@saytrin) (gcc version 3.3.2 20030908 (Debian prerelease)) > > I get strange results (st.st_rdev != 0) in userspace after stat on some > non-devices regular file/directory. On one computer, /etc gives 773 and > /etc/init.d 0, while on another /etc gives 0 and /etc/init.d 13478.
st_rdev is undefined for non-devices, so any userland code that relies on it being zero is broken. It wouldn't hurt to zero it out, but any application that has problems with that needs to be fixed anyway. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |