]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
isofs: use QSTR_LEN() in isofs_cmp
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 20 Apr 2026 10:25:46 +0000 (12:25 +0200)
committerJan Kara <jack@suse.cz>
Mon, 20 Apr 2026 15:27:28 +0000 (17:27 +0200)
Use QSTR_LEN() and inline the code in isofs_cmp(). Remove the stale
function comment while at it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260420102544.8924-3-thorsten.blum@linux.dev
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/namei.c

index 8dd3911717e0cc221f60fb6447e1bf26cc2223dd..3ace3d6a55e796b50d996855431077fb7af3f7ad 100644 (file)
 #include <linux/gfp.h>
 #include "isofs.h"
 
-/*
- * ok, we cannot use strncmp, as the name is not in our data space.
- * Thus we'll have to use isofs_match. No big problem. Match also makes
- * some sanity tests.
- */
 static int
 isofs_cmp(struct dentry *dentry, const char *compare, int dlen)
 {
-       struct qstr qstr;
-       qstr.name = compare;
-       qstr.len = dlen;
        if (likely(!dentry->d_op))
                return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen);
-       return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, &qstr);
+       return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name,
+                                      &QSTR_LEN(compare, dlen));
 }
 
 /*