Re: [PATCH v5 06/10] vfs: add O_CREAT|O_DIRECTORY to open*(2)
From: Jori Koolstra
Date: Mon Aug 31 2026 - 05:42:11 EST
> Op 31-08-2026 11:34 CEST schreef Christian Brauner <brauner@xxxxxxxxxx>:
>
>
> > +static inline
> > +struct dentry *vfs_mkdir_no_perm(struct mnt_idmap *, struct inode *,
> > + struct dentry *, umode_t,
> > + struct delegated_inode *);
> > /*
> > * Look up and maybe create and open the last component.
> > *
> > @@ -4462,6 +4501,7 @@ static struct dentry *lookup_open(struct nameidata *nd, struct file *file,
> > struct mnt_idmap *idmap;
> > struct dentry *dir = nd->path.dentry;
> > struct inode *dir_inode = dir->d_inode;
> > + bool create_dir = O_IS_MKDIR(op->mode);
>
> So this is called on op->mode which is 16-bit an O_DIRECTORY is bit 16.
> Hence, "create_dir" is always false. I think you wanted to test
> op->open_flag...
Yes, during rebasing somehow this happened. I fixed it, but then apparently forgot to
format-patch again... So this garbage series does not even run the selftests. Anyhow,
I am going to resend it today or tomorrow, but the structure remains the same, so I
can then also incorporate anything else you've found.
Thanks for looking into this again, Christian.