All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, Christian Brauner <brauner@kernel.org>
Subject: [git pull] pile 6: f_path stuff
Date: Fri, 3 Oct 2025 23:15:58 +0100	[thread overview]
Message-ID: <20251003221558.GA2441659@ZenIV> (raw)

	The last of the stuff in -next - file->f_path constification.
Only one thing was modifying ->f_path of an opened file - acct(2).
Massaging that away and constifying a bunch of struct path * arguments
in functions that might be given &file->f_path ends up with the
situation where we can turn ->f_path into an anon union of const
struct path f_path and struct path __f_path, the latter modified only
in a few places in fs/{file_table,open,namei}.c, all for struct file
instances that are yet to be opened.

Several conflicts:
[fs/namei.c, include/linux/namei.h]: s/done_path_create/end_creating_path/
	in mainline.
[include/linux/namei.h]: end_removing_path() is a wrapper around the same thing,
	also needs struct path * argument constified.
[fs/open.c]: trivial conflict in finish_no_open()
[fs/nsfs.c]: less obvious: fs/nsfs.c:nsfs_export_open() needs struct path *
	argument constified.

See proposed resolution in #proposed.merge-2...

The following changes since commit a79765248649de77771c24f7be08ff4c96f16f7a:

  constify {__,}mnt_is_readonly() (2025-09-17 15:58:29 -0400)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git pull-f_path

for you to fetch changes up to 2f7d98f10b8f64525b2c74cae7d70ae5278eb654:

  Have cc(1) catch attempts to modify ->f_path (2025-09-27 20:18:41 -0400)

----------------------------------------------------------------
file->f_path constification

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

----------------------------------------------------------------
Al Viro (24):
      backing_file_user_path(): constify struct path *
      constify path argument of vfs_statx_path()
      filename_lookup(): constify root argument
      done_path_create(): constify path argument
      bpf...d_path(): constify path argument
      nfs: constify path argument of __vfs_getattr()
      rqst_exp_get_by_name(): constify path argument
      export_operations->open(): constify path argument
      check_export(): constify path argument
      ksmbd_vfs_path_lookup_locked(): root_share_path can be const struct path *
      ksmbd_vfs_kern_path_unlock(): constify path argument
      ksmbd_vfs_inherit_posix_acl(): constify path argument
      ksmbd_vfs_set_init_posix_acl(): constify path argument
      ovl_ensure_verity_loaded(): constify datapath argument
      ovl_validate_verity(): constify {meta,data}path arguments
      ovl_get_verity_digest(): constify path argument
      ovl_lower_dir(): constify path argument
      ovl_sync_file(): constify path argument
      ovl_is_real_file: constify realpath argument
      apparmor/af_unix: constify struct path * arguments
      configfs:get_target() - release path as soon as we grab configfs_item reference
      kernel/acct.c: saner struct file treatment
      Merge branches 'work.path' and 'work.mount' into work.f_path
      Have cc(1) catch attempts to modify ->f_path

 fs/bpf_fs_kfuncs.c                             |  2 +-
 fs/configfs/symlink.c                          | 33 ++++-----
 fs/file_table.c                                |  6 +-
 fs/internal.h                                  |  2 +-
 fs/namei.c                                     | 12 ++--
 fs/nfs/localio.c                               |  2 +-
 fs/nfsd/export.c                               |  4 +-
 fs/nfsd/export.h                               |  2 +-
 fs/open.c                                      | 10 +--
 fs/overlayfs/copy_up.c                         |  2 +-
 fs/overlayfs/file.c                            |  2 +-
 fs/overlayfs/overlayfs.h                       |  8 +--
 fs/overlayfs/super.c                           |  2 +-
 fs/overlayfs/util.c                            |  8 +--
 fs/pidfs.c                                     |  2 +-
 fs/smb/server/vfs.c                            |  8 +--
 fs/smb/server/vfs.h                            |  6 +-
 fs/stat.c                                      |  2 +-
 include/linux/exportfs.h                       |  2 +-
 include/linux/fs.h                             |  9 ++-
 include/linux/namei.h                          |  2 +-
 kernel/acct.c                                  | 96 ++++++++++----------------
 kernel/trace/bpf_trace.c                       |  2 +-
 security/apparmor/af_unix.c                    | 14 ++--
 tools/testing/selftests/bpf/bpf_experimental.h |  2 +-
 25 files changed, 107 insertions(+), 133 deletions(-)

             reply	other threads:[~2025-10-03 22:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 22:15 Al Viro [this message]
2025-10-03 22:31 ` [git pull] pile 6: f_path stuff Linus Torvalds
2025-10-03 22:42   ` Al Viro
2025-10-04  0:44 ` pr-tracker-bot
2025-10-04 16:15 ` Alexei Starovoitov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251003221558.GA2441659@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.