mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
@ 2026-12-02 13:57 Jori Koolstra
  0 siblings, 0 replies; 9+ messages in thread
From: Jori Koolstra @ 2026-12-02 13:57 UTC (permalink / raw)
  To: Christian Brauner
  Cc: viro, jack, neil, cyphar, jlayton, amir73il, shakeel.butt,
	gregkh, tj, linux-fsdevel, linux-kernel


> Op 30-11-2026 15:53 CET schreef Christian Brauner <brauner@kernel.org>:
> 
>  
> On Sun, Nov 22, 2026 at 10:20:23PM +0100, Jori Koolstra wrote:
> > However, I am not sure that relying on holding the parent's i_rwsem is
> > sufficient for the atomicity that we are trying to provide. Afaict nothing
> > in the kernfs layer prevents you from removing a grandparent and a recursive
> > kernfs_remove() of an ancestor never touches the immediate parent's i_rwsem.
> 
> cgroup cannot hit it because cgroup_destroy_locked() refuses to remove a
> group with online children. The only other case is resctrl.
> 
> While an rmdir() of a control group removes mon_groups/<new> without
> ever taking the i_rwsem of mon_groups it still can't hand out the wrong
> directory.
> 
> The lookup in kernfs_iop_mkdir() runs under kernfs_rwsem and either
> finds nothing or finds an inactive node that kernfs_get_inode_locked()
> refuses. And both end in -ESTALE.

Hmm, yes, the draining may drop the kernfs_rwsem, but at that point all the kn
descendants will have been deactivated under kernfs_rwsem and a racing mkdir
will result in -ESTALE. Or mkdir reaches the lookup first and grabs the rwsem,
and then the rmdir is as if it never raced but just happened after the mkdir,
and you end up with an fd pointing to a removed dir. This is fine because it
is still the dir the process created (although not much can be done with it,
I think?)

So if I am correct then, none of this is protected by the mutexes of cgroup and
resctrl, and also not by the inode rwsem. The guarantees run of the kernfs
locking itself. If that is true, I think the comment:

	/*
	 * Find the node that ->mkdir() created.  The parent's i_rwsem is
	 * held, so only a removal from inside the kernel can make it go
	 * away again, and then the open fails like one of a removed
	 * directory.
	 */

may be a bit misleading then. Userspace can trigger removal and race protection
does not come from the i_rwsem at all.

Can you clarify this? I must admit that I find the locking here not easy to
grasp. I am just making sure I am on the same page.


> 
> Afaict, nothign in between can grab that name:
> 
> * kernfs_add_one() refuses a parent that is being removed
> * a new node of that name under a live parent needs the i_rwsem we're holding
> 
> So either you get the directory you created or the open fails.
> 
> > Also, returning -ESTALE, if you set LOOKUP_REVAL, can make open(O_CREAT|O_DIRECTORY)
> > return -ENOENT. Not sure if that is what you want.
> 
> I think that's what we want. The retry runs after the removal so it
> returns what you'd get if the rmdir() had won outright.

OK, the point I wanted to make is stupid because this also happens when any part of
the mkdir path does not exist. But, now that I reread all the code, I guess that
removing a grandfather in resctrl might end you up with -ENODEV. I think we should
get this in line with the -ESTALE return you've added. But this is another patch.
Agree?

Best,
Jori.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
  2026-11-22 21:20   ` Jori Koolstra
@ 2026-11-30 14:53     ` Christian Brauner
  0 siblings, 0 replies; 9+ messages in thread
From: Christian Brauner @ 2026-11-30 14:53 UTC (permalink / raw)
  To: Jori Koolstra
  Cc: viro, jack, neil, cyphar, jlayton, amir73il, shakeel.butt,
	gregkh, tj, linux-fsdevel, linux-kernel

On Sun, Nov 22, 2026 at 10:20:23PM +0100, Jori Koolstra wrote:
> However, I am not sure that relying on holding the parent's i_rwsem is
> sufficient for the atomicity that we are trying to provide. Afaict nothing
> in the kernfs layer prevents you from removing a grandparent and a recursive
> kernfs_remove() of an ancestor never touches the immediate parent's i_rwsem.

cgroup cannot hit it because cgroup_destroy_locked() refuses to remove a
group with online children. The only other case is resctrl.

While an rmdir() of a control group removes mon_groups/<new> without
ever taking the i_rwsem of mon_groups it still can't hand out the wrong
directory.

The lookup in kernfs_iop_mkdir() runs under kernfs_rwsem and either
finds nothing or finds an inactive node that kernfs_get_inode_locked()
refuses. And both end in -ESTALE.

Afaict, nothign in between can grab that name:

* kernfs_add_one() refuses a parent that is being removed
* a new node of that name under a live parent needs the i_rwsem we're holding

So either you get the directory you created or the open fails.

> Also, returning -ESTALE, if you set LOOKUP_REVAL, can make open(O_CREAT|O_DIRECTORY)
> return -ENOENT. Not sure if that is what you want.

I think that's what we want. The retry runs after the removal so it
returns what you'd get if the rmdir() had won outright.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
  2026-11-18 16:30 ` Christian Brauner
  2026-11-18 16:42   ` Shakeel Butt
@ 2026-11-22 21:20   ` Jori Koolstra
  2026-11-30 14:53     ` Christian Brauner
  1 sibling, 1 reply; 9+ messages in thread
From: Jori Koolstra @ 2026-11-22 21:20 UTC (permalink / raw)
  To: Christian Brauner
  Cc: viro, jack, neil, cyphar, jlayton, amir73il, shakeel.butt,
	gregkh, tj, linux-fsdevel, linux-kernel

Hi Christian,

> Op 18-11-2026 11:30 EST schreef Christian Brauner <brauner@kernel.org>:
> 
>  
> On Sat, Oct 24, 2026 at 11:35:27PM +0200, Jori Koolstra wrote:
> > This series implements new semantics for the O_CREAT|O_DIRECTORY flag
> > combination for open*(2): perform a mkdir and open the resulting
> > directory; return a pinning fd (which mkdir does not).
> 
> I've applied this to vfs-7.5.directory and folded a bunch of fixes into
> it. Each fixup is attached as a git note to the commit I folded it into
> so you can see what I massaged:
> 
> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git \
>     +vfs-7.5.directory:refs/remotes/vfs/vfs-7.5.directory \
>     +refs/notes/vfs-7.5.directory:refs/notes/vfs-7.5.directory
> git log --notes=vfs-7.5.directory v7.4-rc1..vfs/vfs-7.5.directory
> 
> The biggest change is kernfs. kernfs_iop_mkdir() now just looks up the
> new node by name so the kernfs_syscall_ops change is gone and cgroup and
> resctrl aren't touched at all anymore.
> 
> The kernfs patches are in vfs-7.5.kernfs as "kernfs: instantiate the
> dentry in kernfs_iop_mkdir()". I'll sent that out soon.
> 
> I split out of 09/12, your kernfs_iattr_rwsem fix and the kernfs part of
> 11/12. vfs-7.5.directory is based on the first one.
> 
> I dropped "vfs: move ->create check in lookup_open() to before
> try_break_deleg()". vfs_create_no_perm() does that check itself now.
> 
> Let me know if I messed something up.

Thanks for pushing this along and taking a look.

I am a bit confused with the order of some of the fixups, but it does
not really matter since at the end it works out. But e.g. you first remove
the dir->i_op->create check from vfs_create(), then add it again in another
fixup, and then change the error code.

Overall, I agree with the changes. It does make more sense to do the
SB_I_NO_ATOMIC_MKDIR check in open_last_lookups() and that simplifies the
logic. Also, I like how you've split "kernfs: instantiate the dentry in
kernfs_iop_mkdir()" out. That is much better and allows Shakeel to continue
his stuff easier. I should have done so and not be lazy.

However, I am not sure that relying on holding the parent's i_rwsem is
sufficient for the atomicity that we are trying to provide. Afaict nothing
in the kernfs layer prevents you from removing a grandparent and a recursive
kernfs_remove() of an ancestor never touches the immediate parent's i_rwsem.

Also, returning -ESTALE, if you set LOOKUP_REVAL, can make open(O_CREAT|O_DIRECTORY)
return -ENOENT. Not sure if that is what you want.

I also see that "kernfs: hold kernfs_iattr_rwsem when initializing a new inode"
went to the kernfs tree, so that is fine too.

Best,
Jori.

PS. See you at FOSDEM...?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
  2026-11-18 16:42   ` Shakeel Butt
@ 2026-11-20  8:59     ` Christian Brauner
  0 siblings, 0 replies; 9+ messages in thread
From: Christian Brauner @ 2026-11-20  8:59 UTC (permalink / raw)
  To: Shakeel Butt
  Cc: Jori Koolstra, viro, jack, neil, cyphar, jlayton, amir73il,
	gregkh, tj, linux-fsdevel, linux-kernel

On Wed, Nov 18, 2026 at 08:42:47AM -0800, Shakeel Butt wrote:
> On Wed, Nov 18, 2026 at 05:30:20PM +0100, Christian Brauner wrote:
> > On Sat, Oct 24, 2026 at 11:35:27PM +0200, Jori Koolstra wrote:
> > > This series implements new semantics for the O_CREAT|O_DIRECTORY flag
> > > combination for open*(2): perform a mkdir and open the resulting
> > > directory; return a pinning fd (which mkdir does not).
> > 
> > I've applied this to vfs-7.5.directory and folded a bunch of fixes into
> > it. Each fixup is attached as a git note to the commit I folded it into
> > so you can see what I massaged:
> > 
> > git fetch https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git \
> >     +vfs-7.5.directory:refs/remotes/vfs/vfs-7.5.directory \
> >     +refs/notes/vfs-7.5.directory:refs/notes/vfs-7.5.directory
> > git log --notes=vfs-7.5.directory v7.4-rc1..vfs/vfs-7.5.directory
> > 
> > The biggest change is kernfs. kernfs_iop_mkdir() now just looks up the
> > new node by name so the kernfs_syscall_ops change is gone and cgroup and
> > resctrl aren't touched at all anymore.
> > 
> > The kernfs patches are in vfs-7.5.kernfs as "kernfs: instantiate the
> > dentry in kernfs_iop_mkdir()". I'll sent that out soon.
> > 
> > I split out of 09/12, your kernfs_iattr_rwsem fix and the kernfs part of
> > 11/12. vfs-7.5.directory is based on the first one.
> > 
> > I dropped "vfs: move ->create check in lookup_open() to before
> > try_break_deleg()". vfs_create_no_perm() does that check itself now.
> > 
> > Let me know if I messed something up.
> 
> Just a heads up from my side. I will be sending couple of kernfs series over the
> next couple of weeks. First one will be removing kernfs_iattr_rwsem from
> mkdir/rmdir paths and later ones will be trying to make open, lookup, stat and
> readdir operations lockless for kernfs.

Sounds good!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
  2026-11-18 16:30 ` Christian Brauner
@ 2026-11-18 16:42   ` Shakeel Butt
  2026-11-20  8:59     ` Christian Brauner
  2026-11-22 21:20   ` Jori Koolstra
  1 sibling, 1 reply; 9+ messages in thread
From: Shakeel Butt @ 2026-11-18 16:42 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Jori Koolstra, viro, jack, neil, cyphar, jlayton, amir73il,
	gregkh, tj, linux-fsdevel, linux-kernel

On Wed, Nov 18, 2026 at 05:30:20PM +0100, Christian Brauner wrote:
> On Sat, Oct 24, 2026 at 11:35:27PM +0200, Jori Koolstra wrote:
> > This series implements new semantics for the O_CREAT|O_DIRECTORY flag
> > combination for open*(2): perform a mkdir and open the resulting
> > directory; return a pinning fd (which mkdir does not).
> 
> I've applied this to vfs-7.5.directory and folded a bunch of fixes into
> it. Each fixup is attached as a git note to the commit I folded it into
> so you can see what I massaged:
> 
> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git \
>     +vfs-7.5.directory:refs/remotes/vfs/vfs-7.5.directory \
>     +refs/notes/vfs-7.5.directory:refs/notes/vfs-7.5.directory
> git log --notes=vfs-7.5.directory v7.4-rc1..vfs/vfs-7.5.directory
> 
> The biggest change is kernfs. kernfs_iop_mkdir() now just looks up the
> new node by name so the kernfs_syscall_ops change is gone and cgroup and
> resctrl aren't touched at all anymore.
> 
> The kernfs patches are in vfs-7.5.kernfs as "kernfs: instantiate the
> dentry in kernfs_iop_mkdir()". I'll sent that out soon.
> 
> I split out of 09/12, your kernfs_iattr_rwsem fix and the kernfs part of
> 11/12. vfs-7.5.directory is based on the first one.
> 
> I dropped "vfs: move ->create check in lookup_open() to before
> try_break_deleg()". vfs_create_no_perm() does that check itself now.
> 
> Let me know if I messed something up.

Just a heads up from my side. I will be sending couple of kernfs series over the
next couple of weeks. First one will be removing kernfs_iattr_rwsem from
mkdir/rmdir paths and later ones will be trying to make open, lookup, stat and
readdir operations lockless for kernfs.

The kernfs_iattr_rwsem one, I will send out later today.

thanks,
Shakeel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
  2026-10-24 21:35 Jori Koolstra
  2026-11-04 23:44 ` John Ericson
  2026-11-06 14:33 ` Christian Brauner
@ 2026-11-18 16:30 ` Christian Brauner
  2026-11-18 16:42   ` Shakeel Butt
  2026-11-22 21:20   ` Jori Koolstra
  2 siblings, 2 replies; 9+ messages in thread
From: Christian Brauner @ 2026-11-18 16:30 UTC (permalink / raw)
  To: Jori Koolstra
  Cc: viro, jack, neil, cyphar, jlayton, amir73il, shakeel.butt,
	gregkh, tj, linux-fsdevel, linux-kernel

On Sat, Oct 24, 2026 at 11:35:27PM +0200, Jori Koolstra wrote:
> This series implements new semantics for the O_CREAT|O_DIRECTORY flag
> combination for open*(2): perform a mkdir and open the resulting
> directory; return a pinning fd (which mkdir does not).

I've applied this to vfs-7.5.directory and folded a bunch of fixes into
it. Each fixup is attached as a git note to the commit I folded it into
so you can see what I massaged:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git \
    +vfs-7.5.directory:refs/remotes/vfs/vfs-7.5.directory \
    +refs/notes/vfs-7.5.directory:refs/notes/vfs-7.5.directory
git log --notes=vfs-7.5.directory v7.4-rc1..vfs/vfs-7.5.directory

The biggest change is kernfs. kernfs_iop_mkdir() now just looks up the
new node by name so the kernfs_syscall_ops change is gone and cgroup and
resctrl aren't touched at all anymore.

The kernfs patches are in vfs-7.5.kernfs as "kernfs: instantiate the
dentry in kernfs_iop_mkdir()". I'll sent that out soon.

I split out of 09/12, your kernfs_iattr_rwsem fix and the kernfs part of
11/12. vfs-7.5.directory is based on the first one.

I dropped "vfs: move ->create check in lookup_open() to before
try_break_deleg()". vfs_create_no_perm() does that check itself now.

Let me know if I messed something up.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
  2026-10-24 21:35 Jori Koolstra
  2026-11-04 23:44 ` John Ericson
@ 2026-11-06 14:33 ` Christian Brauner
  2026-11-18 16:30 ` Christian Brauner
  2 siblings, 0 replies; 9+ messages in thread
From: Christian Brauner @ 2026-11-06 14:33 UTC (permalink / raw)
  To: Jori Koolstra
  Cc: viro, jack, neil, cyphar, jlayton, amir73il, shakeel.butt,
	gregkh, tj, linux-fsdevel, linux-kernel

On Sat, Oct 24, 2026 at 11:35:27PM +0200, Jori Koolstra wrote:
> This series implements new semantics for the O_CREAT|O_DIRECTORY flag
> combination for open*(2): perform a mkdir and open the resulting
> directory; return a pinning fd (which mkdir does not).

Pulling this now for review.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
  2026-10-24 21:35 Jori Koolstra
@ 2026-11-04 23:44 ` John Ericson
  2026-11-06 14:33 ` Christian Brauner
  2026-11-18 16:30 ` Christian Brauner
  2 siblings, 0 replies; 9+ messages in thread
From: John Ericson @ 2026-11-04 23:44 UTC (permalink / raw)
  To: jkoolstra
  Cc: amir73il, brauner, cyphar, gregkh, jack, jlayton, linux-fsdevel,
	linux-kernel, neil, shakeel.butt, tj, viro

Hi,

I am chiming in belatedly, I see, after the concept is well-approved.
But I just wanted to add anyway that that this would be great for Nix.
See https://github.com/NixOS/nix/pull/15244#discussion_r4474714305
where I was just happy to first learn that this was in flight.

Cheers, and good luck getting it across the finish line,

John

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
@ 2026-10-24 21:35 Jori Koolstra
  2026-11-04 23:44 ` John Ericson
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jori Koolstra @ 2026-10-24 21:35 UTC (permalink / raw)
  To: viro, brauner
  Cc: jack, neil, cyphar, jlayton, amir73il, shakeel.butt, gregkh, tj,
	linux-fsdevel, linux-kernel, Jori Koolstra

This series implements new semantics for the O_CREAT|O_DIRECTORY flag
combination for open*(2): perform a mkdir and open the resulting
directory; return a pinning fd (which mkdir does not).

The v6 was found by Brauner to contain a bug because ->mkdir
implementations may leave the dentry negative, and do_open() cannot deal
with that (NULL pointer deref.) This behavior occurs in kernfs and
tracefs at least. Since atomic mkdir is wanted for cgroupfs (as per
Brauner at LPC26), kernfs is changed to return the new kernfs_node from
the kernfs_syscall_ops ->mkdir() callbacks and splicing its inode.

Filesystems that do not support O_CREAT|O_DIRECTORY set
SB_I_NO_ATOMIC_MKDIR, and lookup_open() refuses the open with EOPNOTSUPP
for them before doing any lookup. These are all ->atomic_open()
filesystems, which cannot create directories without protocol
extensions, and tracefs, whose ->mkdir() drops the parent's i_rwsem so
that the directory at the name may not be the one created by the call
(or at least it has to be verified that this plays well with the
atomicity guarantee that O_CREAT|O_DIRECTORY attempts to provide.) For
ecryptfs and apparmorfs there are similar concerns and hence they are
also blocked for now.

Most of the work happens in "vfs: add O_CREAT|O_DIRECTORY to open*(2),"
as may be expected. Before that there is some clean-up work and
preparation. The "vfs: short-circuit MAY_WRITE access for O_DIRECTORY
opens" patch is also worth paying extra attention to as it
short-circuits doomed opening of directories as writable. This check (to
prevent one from opening directories as writable) is currently done very
late in do_open(), after an inode has been obtained. However, when
introducing O_CREAT|O_DIRECTORY this is unacceptable as it would create
the directory and then still fail. This patch does however change some
user visible error codes.

Moreover, "vfs: change ->create/->mkdir operations unavailable errno"
also changes the ->create and ->mkdir unavailable errnos to -EOPNOTSUPP.
A previous attempt to do this more widely stranded before.[1] However,
that regression was only for vfat and does seem specific to changing the
return code from vfs_symlink(). We can drop this patch if needed, but it
would be _really_ ugly.

Changes from vn to v(n+1):
v7: https://lore.kernel.org/linux-fsdevel/20261016143806.2946578-1-jkoolstra@xs4all.nl/
   - Rebased on Neil's shared lookup changes to lookup_open()
   - Fix implementation of kernfs_get_inode_prealloc() after
     discussion with Shakeel Butt.[2] The new kernfs_get_inode_locked()
     takes the kernfs_rwsem for reading, so that __kernfs_remove()
     always finds the inode to clear its i_nlink. The @lookup argument
     is added so that their patch can use the same function.
v6: https://lore.kernel.org/linux-fsdevel/20260913185016.523376-1-jkoolstra@xs4all.nl/
   - Change kernfs to instantiate ->mkdir dentry.
   - Fix kernfs locking when initializing a new inode to hold
     kernfs_iattr_rwsem.
   - Add flag SB_I_NO_ATOMIC_MKDIR to disable O_CREAT|O_DIRECTORY on
     unsupported filesystems (instead of only looking at ->atomic_open.)
   - Add tests to verify behavior of O_CREAT|O_DIRECTORY on cgroupfs and
     tracefs.
v5: https://lore.kernel.org/linux-fsdevel/20260823160706.358293-1-jkoolstra@xs4all.nl/
   - Uniformize ->create and ->mkdir unavailable errnos to -EOPNOTSUPP.
   - Return -EOPNOTSUPP instead of -ENOENT when O_CREAT|O_DIRECTORY is
     not supported by a ->atomic_open filesystem.
   - Added test cases for dangling symlink and sticky directory
     behaviour, and a test that verifies O_TMPFILE|O_CREAT is still
     -EINVAL.
   - Split off "vfs: lookup_open(): lock the parent as I_MUTEX_PARENT"
     as a separate patch.
   - Fixed the issues pointed out by Brauner in v5.
v4: https://lore.kernel.org/linux-fsdevel/20260712175539.1565444-1-jkoolstra@xs4all.nl/
   - rebased on 7.2, which includes my changes to auditing in
     lookup_open() as well as Neil Brown's changes to the same function
     for the implementation of vfs_lookup_open().
v3: https://lore.kernel.org/linux-fsdevel/20260704164149.3480051-1-jkoolstra@xs4all.nl/
   - address the inconsistency in calling audit_inode_child() in
     lookup_open() versus vfs_create() in a separate series.
   - fclog.c selftest header fix moved to separate patch.
   - add a "with trailing slash test" success test to the included
     selftests. 
   - pass struct qstr by pointer to trailing_slashes() and add a comment
     on what it does
   - changed commit message of "vfs: add O_CREAT|O_DIRECTORY to
     open*(2)" to address comments of Brauner

[1]: https://lore.kernel.org/linux-fsdevel/90228c39-04e7-41ef-ad91-84a8bb866650@sirena.org.uk/
[2]: https://lore.kernel.org/linux-fsdevel/20261016220029.3276154-1-shakeel.butt@linux.dev/



Jori Koolstra (12):
  fs/namei.c: use trailing_slashes()
  vfs: prepare vfs_creat|mkdir_no_perm for reuse in lookup_open()
  vfs: lookup_open(): move setting FMODE_CREATED down
  vfs: move ->create check in lookup_open() to before try_break_deleg()
  vfs: lookup_open(): use vfs_create_no_perm()
  vfs: lookup_open(): lock the parent as I_MUTEX_PARENT
  vfs: short-circuit MAY_WRITE access for O_DIRECTORY opens
  kernfs: hold kernfs_iattr_rwsem when initializing a new inode
  vfs: add O_CREAT|O_DIRECTORY to open*(2)
  vfs: use finish_lookup() helper in __lookup_slow() and lookup_open()
  vfs: change ->create/->mkdir operations unavailable errno
  selftest: add tests for open*(O_CREAT|O_DIRECTORY)

 arch/alpha/include/uapi/asm/errno.h           |   2 +-
 arch/mips/include/uapi/asm/errno.h            |   2 +-
 arch/parisc/include/uapi/asm/errno.h          |   2 +-
 arch/sparc/include/uapi/asm/errno.h           |   2 +-
 fs/9p/vfs_super.c                             |   1 +
 fs/ceph/super.c                               |   1 +
 fs/ecryptfs/main.c                            |   1 +
 fs/fuse/inode.c                               |   1 +
 fs/gfs2/ops_fstype.c                          |   1 +
 fs/kernfs/dir.c                               |  38 +-
 fs/kernfs/inode.c                             |  60 ++-
 fs/kernfs/kernfs-internal.h                   |   4 +
 fs/namei.c                                    | 278 +++++++++-----
 fs/nfs/super.c                                |   1 +
 fs/open.c                                     |  42 ++-
 fs/resctrl/rdtgroup.c                         |  35 +-
 fs/smb/client/cifsfs.c                        |   1 +
 fs/tracefs/inode.c                            |   1 +
 fs/vboxsf/super.c                             |   1 +
 include/linux/fcntl.h                         |   6 +
 include/linux/fs/super_types.h                |   1 +
 include/linux/kernfs.h                        |   7 +-
 include/uapi/asm-generic/errno.h              |   2 +-
 kernel/cgroup/cgroup-internal.h               |   3 +-
 kernel/cgroup/cgroup.c                        |  16 +-
 security/apparmor/apparmorfs.c                |   1 +
 .../testing/selftests/filesystems/.gitignore  |   1 +
 tools/testing/selftests/filesystems/Makefile  |   2 +-
 .../filesystems/open_o_creat_o_dir.c          | 346 ++++++++++++++++++
 .../testing/selftests/filesystems/wrappers.h  |  11 +
 30 files changed, 724 insertions(+), 146 deletions(-)
 create mode 100644 tools/testing/selftests/filesystems/open_o_creat_o_dir.c


base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
-- 
2.56.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-12-02 13:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 13:57 [PATCH v8 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2) Jori Koolstra
  -- strict thread matches above, loose matches on Subject: below --
2026-10-24 21:35 Jori Koolstra
2026-11-04 23:44 ` John Ericson
2026-11-06 14:33 ` Christian Brauner
2026-11-18 16:30 ` Christian Brauner
2026-11-18 16:42   ` Shakeel Butt
2026-11-20  8:59     ` Christian Brauner
2026-11-22 21:20   ` Jori Koolstra
2026-11-30 14:53     ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®