From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE953399341 for ; Mon, 20 Apr 2026 10:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776680778; cv=none; b=uWSTfwllp3AE27MmmGUTRZwf8X78AuDrcmcHAVeN1oLZtt2HlzS4jCzLIYoWvq9tmM4Zn6IT984lXiREh8cPePmVc8B3nf0L/YzhS6YcPdh3DYIDYSbtTuSqbugoH5MKV2XYlfgcVo8+KsRXBv5k6JHAt9oOXysUfLl/u9kM4jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776680778; c=relaxed/simple; bh=LNwtkyQm8ws9gq+tN7DCrWXtxJsr7UMAUp6HhbEZyys=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UenURkoyjswLN8XzlDynjoppVwsQqzGesAaGwPIPa/Bn3u3GORz0AyE0ZHNJ2ZwpnAKKNDvJ+VvI0v2u375UPRbPw3V8dT6iRYdD2Yb2dz0VZwL6GoX+opOC0XcsaOvvfjwu2Lg+Q2QpY3U+8w4Dmhd+qySXPV5TYoBuVgmWKKM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=CyibQGLN; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CyibQGLN" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1776680772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=g0U1mDAbh5FMjsnXPHCnKYzI9MG3xW/VdlKBh0nFLkU=; b=CyibQGLNgQ+HeZk8ueQyUJ9ZQ4nNkAIn2WTaGRHFVbZgAvV4WLom3teCeCknytjtpAWKil AybFyltjrp55Zt+54h4lIEu3pJIelG4zh/sXXBYE0d3Luyz95f06KsMn2KBOdjPZkm2WLQ AmBBBKuG5eO/69C1/uqbAdODph/PJxY= From: Thorsten Blum To: Jan Kara Cc: Thorsten Blum , 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 Message-ID: <20260420102544.8924-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1124; i=thorsten.blum@linux.dev; h=from:subject; bh=LNwtkyQm8ws9gq+tN7DCrWXtxJsr7UMAUp6HhbEZyys=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDJlP/2u84uTdu3miFVfIJ+dpQtrHGibGbXqq8rxPRnLy0 2n5+V+aOkpZGMS4GGTFFFkezPoxw7e0pnKTScROmDmsTCBDGLg4BWAi74sZ/qm1a4Q8PnR77peL TBV6Kd+W+k/ftsGob774Z/FDDAHh0xcz/Pc3nTxx7ZLOV9pK72W+nDm/cWbPya/T9E70XF9vvCL 2bjIrAA== X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Use QSTR_LEN() and inline the code in isofs_cmp(). Remove the stale function comment while at it. Signed-off-by: Thorsten Blum --- 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 #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)); } /*