On Fri, 2011-07-29 at 15:56 +0000, Mrbuddy wrote: > > HI: > > When I use mknod(./node_1077,0100777,0), it return a error errno=2:No such file or directory. > Mode 0100777 means create a common file.so I compared it with touch. > > I found that when calling nfs4_do_open,in touch the flag is 0x8482,but in mknod,the flag is 0x40. > When calling mknod,the flag come from function nfs_create, > > if((nd->flags & LOOKUP_CREATE) !=0) > open_flags = nd->intent.open.flags; > > so i guess can I add a flags at here as below: > > if((nd->flags & LOOKUP_CREATE) !=0) > open_flags = nd->intent.open.flags | O_CREAT | F_WRLCK; > > with this change, mknod(./node_1077,0100777,0) return success. > look forward to your reply. Isn't this issue already fixed in mainline by commit f7c85868fc (fix mknod() on nfs4 (hopefully))? Trond -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@xxxxxxxxxx www.netapp.com -- 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