From: Thorsten Blum <thorsten.blum@linux.dev>
To: Jan Kara <jack@suse.cz>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] isofs: use QSTR_LEN() in isofs_cmp
Date: Mon, 20 Apr 2026 12:25:46 +0200 [thread overview]
Message-ID: <20260420102544.8924-3-thorsten.blum@linux.dev> (raw)
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>
---
fs/isofs/namei.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c
index 8dd3911717e0..3ace3d6a55e7 100644
--- a/fs/isofs/namei.c
+++ b/fs/isofs/namei.c
@@ -10,20 +10,13 @@
#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));
}
/*
next reply other threads:[~2026-04-20 10:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 10:25 Thorsten Blum [this message]
2026-04-20 15:28 ` [PATCH] isofs: use QSTR_LEN() in isofs_cmp Jan Kara
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=20260420102544.8924-3-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox