]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
export_operations->open(): constify path argument
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Jul 2025 01:32:41 +0000 (21:32 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Sep 2025 01:17:08 +0000 (21:17 -0400)
for the method and its sole instance...

Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/pidfs.c
include/linux/exportfs.h

index 108e7527f837fd0e46e862d8479356018a9a7c04..5af4fee288ea6369ff213aff7ba7b462bf43e107 100644 (file)
@@ -847,7 +847,7 @@ static int pidfs_export_permission(struct handle_to_path_ctx *ctx,
        return 0;
 }
 
-static struct file *pidfs_export_open(struct path *path, unsigned int oflags)
+static struct file *pidfs_export_open(const struct path *path, unsigned int oflags)
 {
        /*
         * Clear O_LARGEFILE as open_by_handle_at() forces it and raise
index cfb0dd1ea49c70cb0851d55821222b16acd9d9c3..f43c83e0b8c591c3a798fbfa4431d4f5a616c412 100644 (file)
@@ -270,7 +270,7 @@ struct export_operations {
        int (*commit_blocks)(struct inode *inode, struct iomap *iomaps,
                             int nr_iomaps, struct iattr *iattr);
        int (*permission)(struct handle_to_path_ctx *ctx, unsigned int oflags);
-       struct file * (*open)(struct path *path, unsigned int oflags);
+       struct file * (*open)(const struct path *path, unsigned int oflags);
 #define        EXPORT_OP_NOWCC                 (0x1) /* don't collect v3 wcc data */
 #define        EXPORT_OP_NOSUBTREECHK          (0x2) /* no subtree checking */
 #define        EXPORT_OP_CLOSE_BEFORE_UNLINK   (0x4) /* close files before unlink */