]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
exfat_find(): constify qstr argument
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 5 Feb 2024 02:33:49 +0000 (21:33 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Sep 2025 01:08:33 +0000 (21:08 -0400)
Nothing outside of fs/dcache.c has any business modifying
dentry names; passing &dentry->d_name as an argument should
have that argument declared as a const pointer.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exfat/namei.c

index f5f1c4e8a29fd21cca4a516c54e83588a24e615f..c8388a2ec2277562880a0def3e571cefb32d060e 100644 (file)
@@ -587,7 +587,7 @@ unlock:
 }
 
 /* lookup a file */
-static int exfat_find(struct inode *dir, struct qstr *qname,
+static int exfat_find(struct inode *dir, const struct qstr *qname,
                struct exfat_dir_entry *info)
 {
        int ret, dentry, count;