Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3695047ybv; Mon, 10 Feb 2020 04:52:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwBP+bQa1lZAwBSUfQ/pRwK66053WgJMjie9/Edws+0d6CNe2PRRNIrOfK1WmMZHJjbZf9v X-Received: by 2002:a05:6830:110a:: with SMTP id w10mr953463otq.300.1581339135099; Mon, 10 Feb 2020 04:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339135; cv=none; d=google.com; s=arc-20160816; b=etE8/HdEtVxPf++5AJgeen7edESCicngFdyHyN1X/WiQavDpZK/5aQma8HyZIuBzfl 2L3TgJMdPG902C+fq7T2p+J7ywWDzJEczqky7rctbgMXVJ428fFNxE1sZvlsj+P73211 5+I84Qb98t+szolMZjnlWmAilzyuF+39Ai/Y5JI2YwZewHw5yrshDA+RwqXIsUKO9nmP 2tk2Tf3DoSH5rmCmOyU0AMn7md0OmxOaoNXlNAk/a4BZVwqGHoBamavO2GQ2jgd7yjez 2L8A3NFFmzE35k/6aXQSOsqc3T/nxYeB+rzsqmU52YcLVRzHw/6aNZ2H6F2mjf0Pnham lFcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2hFqfAgF/hO7p8XnVEM1qVRd66Ulf2wqmzz39vr8Gg4=; b=TkbK93T/+bQiC+kwhHFN6mDeaOQHWpGcuUcalOmTpRj+zFIISvYt/jZppYN9Q3a/tb zJaS1R+S4NZPXCv2inskOFg1SvIC5cWY8QmDWrCI0ILf6c3IasIDc+qJOmQjMSLUI6D7 rjfkqCKoJftMkIoBNoT98oQ1Wl5Oc+m1eLEfFMZAVgPopfOIz4OP3lqFPpxgbpzSW1Lh Qu1COAGARF5P1vJ3OOFJirNSYAeo38H94Xp9nzulBYkISraWZL9c309XJpmKpdKyYQV7 DL3Wj/qzzqCqfstHrB19jfeFAMht1cLfegYFHGokMvE7peJ46EYfBfhr3+LHl6UEUnHe B0MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aqzGMY80; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si141922otk.134.2020.02.10.04.52.03; Mon, 10 Feb 2020 04:52:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aqzGMY80; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730549AbgBJMoC (ORCPT + 99 others); Mon, 10 Feb 2020 07:44:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:40068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729134AbgBJMkS (ORCPT ); Mon, 10 Feb 2020 07:40:18 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4119620733; Mon, 10 Feb 2020 12:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338418; bh=kmQVuxoiX5ikHORHDfl8KXgDzSS6R5KWecgoJhjI3B8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqzGMY807fPZzTL0BrzC4CQQuyC5IGnxlooLE4b0zB5GE1osnTUGoGXjxOKskqAaj ebKS4VUYLBuUlhOyfAiBcVk/lYav2K7Zs98ZQjSTurAYtU+svMEFG8DmIOuERXt7AX JKIDrGEV7tuAKkP1LxfNCBLQMKqcoKdd0d1P7RXc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Biggers , Jaegeuk Kim Subject: [PATCH 5.5 134/367] f2fs: fix dcache lookup of !casefolded directories Date: Mon, 10 Feb 2020 04:30:47 -0800 Message-Id: <20200210122437.232045429@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Biggers commit 5515eae647426169e4b7969271fb207881eba7f6 upstream. Do the name comparison for non-casefolded directories correctly. This is analogous to ext4's commit 66883da1eee8 ("ext4: fix dcache lookup of !casefolded directories"). Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups") Cc: # v5.4+ Signed-off-by: Eric Biggers Signed-off-by: Jaegeuk Kim Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -1073,7 +1073,7 @@ static int f2fs_d_compare(const struct d if (!IS_CASEFOLDED(dentry->d_parent->d_inode)) { if (len != name->len) return -1; - return memcmp(str, name, len); + return memcmp(str, name->name, len); } return f2fs_ci_compare(dentry->d_parent->d_inode, name, &qstr, false);