> Is there any reason why the superuser shouldn't be able to open by
> inode? This seems an obvious idea; perhaps there's also an obvious
> argument against it that I'm not seeing...
It is an layering violation.
In 2.2 all VFS functions work on a dcache entry which refers to a filename,
not an inode. To open by inode you have to play very dirty tricks: you would
have to generate a dummy name and insert it into the dcache, but not write
it to the physical filesystem[1]. The current knfsd avoids the problem
completely by handing out (inode, parentdir) tokens, based on that information
it can regenerate the complete path and use the dentry directly.
Also some filesystems don't have fixed inodes.
-Andi
[1] I have some very hackish code that does that and implements an open by
inode ioctl, but I wouldn't want to see it in a released kernel.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/