]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge tag 'vfs-6.10.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 May 2024 19:09:18 +0000 (12:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 May 2024 19:09:18 +0000 (12:09 -0700)
Pull vfs mount API conversions from Christian Brauner:
 "This converts qnx6, minix, debugfs, tracefs, freevxfs, and openpromfs
  to the new mount api, further reducing the number of filesystems
  relying on the legacy mount api"

* tag 'vfs-6.10.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  minix: convert minix to use the new mount api
  vfs: Convert tracefs to use the new mount API
  vfs: Convert debugfs to use the new mount API
  openpromfs: finish conversion to the new mount API
  freevxfs: Convert freevxfs to the new mount API.
  qnx6: convert qnx6 to use the new mount api

1  2 
fs/tracefs/inode.c

index 417c840e6403338f0708640527442c87bfe492e7,abd0b477e287595683e306e06c6ddc34dae44fd6..a827f6a716c44ec840357a3afee7a51c04296c86
@@@ -362,9 -295,6 +345,8 @@@ static int tracefs_apply_options(struc
  {
        struct tracefs_fs_info *fsi = sb->s_fs_info;
        struct inode *inode = d_inode(sb->s_root);
-       struct tracefs_mount_opts *opts = &fsi->mount_opts;
 +      struct tracefs_inode *ti;
 +      bool update_uid, update_gid;
        umode_t tmp_mode;
  
        /*
                WRITE_ONCE(inode->i_mode, tmp_mode);
        }
  
-       if (!remount || opts->opts & BIT(Opt_uid))
-               inode->i_uid = opts->uid;
+       if (!remount || fsi->opts & BIT(Opt_uid))
+               inode->i_uid = fsi->uid;
  
-       if (!remount || opts->opts & BIT(Opt_gid))
-               inode->i_gid = opts->gid;
+       if (!remount || fsi->opts & BIT(Opt_gid))
+               inode->i_gid = fsi->gid;
  
-       if (remount && (opts->opts & BIT(Opt_uid) || opts->opts & BIT(Opt_gid))) {
++      if (remount && (fsi->opts & BIT(Opt_uid) || fsi->opts & BIT(Opt_gid))) {
 +
-               update_uid = opts->opts & BIT(Opt_uid);
-               update_gid = opts->opts & BIT(Opt_gid);
++              update_uid = fsi->opts & BIT(Opt_uid);
++              update_gid = fsi->opts & BIT(Opt_gid);
 +
 +              rcu_read_lock();
 +              list_for_each_entry_rcu(ti, &tracefs_inodes, list) {
 +                      if (update_uid)
 +                              ti->flags &= ~TRACEFS_UID_PERM_SET;
 +
 +                      if (update_gid)
 +                              ti->flags &= ~TRACEFS_GID_PERM_SET;
 +
 +                      if (ti->flags & TRACEFS_EVENT_INODE)
 +                              eventfs_remount(ti, update_uid, update_gid);
 +              }
 +              rcu_read_unlock();
 +      }
 +
        return 0;
  }