On Thu, Jun 23, 2011 at 12:19:46AM +0100, Al Viro wrote: > It always worked that way, all the way back to Unix v6 (and I'm fairly sure > to earlier than that; don't have v5 kernel source, unfortunately). Worked > that way in Linux since 0.02/0.03/0.10, when Linus first added mknod(2) > (presumably 0.01 had been tested with /dev populated by Minix ;-) > > As for POSIX, what it says is > The only portable use of mknod() is to create a FIFO-special file. > If mode is not S_IFIFO or dev is not 0, the behaviour of mknod() is > unspecified. > and we support it for all non-directories. Always had... > > Note that the right thing to do is to issue CLOSE and _not_ call > lookup_instantiate_filp() if we are called from sys_mknodat(). We don't > want to leak stateid... OK... See #untested in vfs-2.6.git; the last 5 commits there. The actual fixes are in the last one; to get rid of the dependency on the previous we'd just need to pass open_flags as additional argument to nameidata_to_nfs_open_context() (like untested@{1}, but without removal of nameidata argument - that part depends on earlier commits and is, IMO, a good idea anyway). It seems to work here. Testing and comments would be welcome... -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html