Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

isofs: use QSTR_LEN() in isofs_cmp

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>

authored by

Thorsten Blum and committed by
Jan Kara
cc85e337 24376458

+2 -9
+2 -9
fs/isofs/namei.c
··· 10 10 #include <linux/gfp.h> 11 11 #include "isofs.h" 12 12 13 - /* 14 - * ok, we cannot use strncmp, as the name is not in our data space. 15 - * Thus we'll have to use isofs_match. No big problem. Match also makes 16 - * some sanity tests. 17 - */ 18 13 static int 19 14 isofs_cmp(struct dentry *dentry, const char *compare, int dlen) 20 15 { 21 - struct qstr qstr; 22 - qstr.name = compare; 23 - qstr.len = dlen; 24 16 if (likely(!dentry->d_op)) 25 17 return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); 26 - return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, &qstr); 18 + return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, 19 + &QSTR_LEN(compare, dlen)); 27 20 } 28 21 29 22 /*