All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)
@ 2026-06-14 16:44 Jori Koolstra
  2026-06-14 16:44 ` [PATCH 01/12] fs/namei.c: use trailing_slashes() Jori Koolstra
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Jori Koolstra @ 2026-06-14 16:44 UTC (permalink / raw)
  To: Christian Brauner, Jan Kara, Al Viro, NeilBrown
  Cc: 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).

Jori Koolstra (12):
  fs/namei.c: use trailing_slashes()
  fs/namei.c: move create error && negative dentry case in lookup_open
    up
  vfs: prepare vfs_creat|mkdir_no_perm for reuse in lookup_open()
  fs/namei.c: lookup_open(): move audit_inode_child() up
  vfs: lookup_open(): move setting FMODE_CREATED up when calling
    create()
  vfs: lookup_open(): move i_op->create check to before
    try_break_deleg()
  vfs: lookup_open(): use vfs_create_no_perm()
  vfs: add O_CREAT|O_DIRECTORY to open*(2)
  vfs: move O_IS_MKDIR check out atomic_open() to individual filesystems
  vfs: refuse O_CREAT for directories through a dangling symlink
  vfs: short-circuit MAY_WRITE access for O_DIRECTORY opens
  selftest: add tests for open*(O_CREAT|O_DIRECTORY)

 fs/9p/vfs_inode.c                             |   3 +
 fs/9p/vfs_inode_dotl.c                        |   3 +
 fs/ceph/file.c                                |   3 +
 fs/fuse/dir.c                                 |   3 +
 fs/gfs2/inode.c                               |   3 +
 fs/namei.c                                    | 233 ++++++++++++------
 fs/nfs/dir.c                                  |   3 +
 fs/nfs/file.c                                 |   3 +
 fs/open.c                                     |  32 ++-
 fs/smb/client/dir.c                           |   3 +
 fs/vboxsf/dir.c                               |   3 +
 include/linux/fcntl.h                         |   7 +
 .../testing/selftests/filesystems/.gitignore  |   1 +
 tools/testing/selftests/filesystems/Makefile  |   4 +-
 tools/testing/selftests/filesystems/fclog.c   |   1 +
 .../filesystems/open_o_creat_o_dir.c          | 197 +++++++++++++++
 16 files changed, 413 insertions(+), 89 deletions(-)
 create mode 100644 tools/testing/selftests/filesystems/open_o_creat_o_dir.c


base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
-- 
2.54.0


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

end of thread, other threads:[~2026-06-15 21:43 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-14 16:44 [PATCH 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2) Jori Koolstra
2026-06-14 16:44 ` [PATCH 01/12] fs/namei.c: use trailing_slashes() Jori Koolstra
2026-06-15  9:26   ` David Laight
2026-06-14 16:44 ` [PATCH 02/12] fs/namei.c: move create error && negative dentry case in lookup_open up Jori Koolstra
2026-06-15  9:37   ` David Laight
2026-06-14 16:44 ` [PATCH 03/12] vfs: prepare vfs_creat|mkdir_no_perm for reuse in lookup_open() Jori Koolstra
2026-06-14 16:44 ` [PATCH 04/12] fs/namei.c: lookup_open(): move audit_inode_child() up Jori Koolstra
2026-06-15 21:43   ` Jori Koolstra
2026-06-14 16:44 ` [PATCH 05/12] vfs: lookup_open(): move setting FMODE_CREATED up when calling create() Jori Koolstra
2026-06-14 16:44 ` [PATCH 06/12] vfs: lookup_open(): move i_op->create check to before try_break_deleg() Jori Koolstra
2026-06-14 16:44 ` [PATCH 07/12] vfs: lookup_open(): use vfs_create_no_perm() Jori Koolstra
2026-06-14 16:44 ` [PATCH 08/12] vfs: add O_CREAT|O_DIRECTORY to open*(2) Jori Koolstra
2026-06-14 16:44 ` [PATCH 09/12] vfs: move O_IS_MKDIR check out atomic_open() to individual filesystems Jori Koolstra
2026-06-14 16:44 ` [PATCH 10/12] vfs: refuse O_CREAT for directories through a dangling symlink Jori Koolstra
2026-06-14 16:44 ` [PATCH 11/12] vfs: short-circuit MAY_WRITE access for O_DIRECTORY opens Jori Koolstra
2026-06-14 17:01   ` Jori Koolstra
2026-06-15 12:56   ` Jori Koolstra
2026-06-14 16:44 ` [PATCH 12/12] selftest: add tests for open*(O_CREAT|O_DIRECTORY) Jori Koolstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.