On Tue, 13 Mar 2012, Miklos Szeredi wrote: > Christoph Hellwig <hch@xxxxxxxxxxxxx> writes: > > > On Wed, Mar 07, 2012 at 10:22:30PM +0100, Miklos Szeredi wrote: > >> From: Miklos Szeredi <mszeredi@xxxxxxx> > >> > >> Replace CIFS's ->create operation with ->atomic_open and ->atomic_create. Also > >> move the relevant code from ->lookup into the create function. > >> > >> CIFS currently only does atomic open for O_CREAT, but it wants to do that as > >> early as possible, without first calling ->lookup, so it uses ->atomic_open, > >> just like NFS. > > > > Why does cifs need to set the created flag from inside ->atomic_open? > > > > It's different from everyone else in that respect. > > Apparently CIFS is the only one that can tell whether the file was > created or not. If the flag is set then notify_create() is called. > Users of NFS doesn't seem to care, it's of dubious value anyway, but why > not use the info when available? It also add MAY_OPEN to acc_mode... I take it that only matters if the fs who set created = true looks for it in ->permission()? + acc_mode = op->acc_mode; + if (created) { + fsnotify_create(dir, dentry); + acc_mode = MAY_OPEN; + } sage -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html