On Mon, Jan 16, 2017 at 3:04 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > What I tried to do at first is leave d_alloc inside vfs_tmpfile() > and return dentry, but I did not want this interface to deal with struct file > as well. Agreed, I think you should do that. > > so do_tmpfile() is very roughly equivalent to: > path_lookupat() > mnt_want_write() > vfs_tmpfile() (including d_alloc) > dentry_open() > inode->i_state |= I_LINKABLE > > So I can set LINKABLE inside vfs_tmpfile() only if I also pass > it open_flag Yes. > and then it would also happen before open returns > success. It doesn't matter. If open fails the temporary file will be deleted, dentry, inode and all. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html