From patchwork Thu Jun 6 05:43:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: carrion bent X-Patchwork-Id: 1944437 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=o1ceHMGF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=sj9v=ni=vger.kernel.org=linux-ext4+bounces-2789-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VvtYr31scz20PW for ; Thu, 6 Jun 2024 15:44:15 +1000 (AEST) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4VvtYf6bffz4wcl for ; Thu, 6 Jun 2024 15:44:06 +1000 (AEST) Received: by gandalf.ozlabs.org (Postfix) id 4VvtYf6XSMz4wjF; Thu, 6 Jun 2024 15:44:06 +1000 (AEST) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: gandalf.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=o1ceHMGF; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org; envelope-from=linux-ext4+bounces-2789-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4VvtYf2Gx8z4wcl for ; Thu, 6 Jun 2024 15:44:06 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 961B7B2343D for ; Thu, 6 Jun 2024 05:44:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55BA63A1B5; Thu, 6 Jun 2024 05:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="o1ceHMGF" X-Original-To: linux-ext4@vger.kernel.org Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (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 0D9EF446A2 for ; Thu, 6 Jun 2024 05:43:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717652639; cv=none; b=sQ9iw9pw4WFqY4kGYSAL2obUntc9I6DQn3BaAggPvlKRjmYvYRHJmWkX1b1ELw9/5TYn8WVICtTXWnqpXkFhL1bI3HQKjcMkN7FuKUejZescpGKvMvST7OJ8g/0/OinS5RIJ0mgIlwJ5iwLMDqLjF2q8cN36eDy2hOv41rfKnRg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717652639; c=relaxed/simple; bh=E3xoj+QfK7wTNX1uS2jc92oz1Usudj1VLXGehqSzS50=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=F7+BNbviuS2CQF1/j8O20KiyAneuDPT7GU+2GO1MYb4Qp+Ao1XTlbjVCjw2iMZPP+jmVNpb9cyOr1lwDWpiAhPZra8piA1uknMmWoWuBOaSyBCZ0EwdLCoJHVbh1hRzU87wCb/JWGRkeu/+s6xmJdodlPqvVb9U59UOh3dcIB8U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=o1ceHMGF; arc=none smtp.client-ip=115.124.30.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1717652633; h=From:To:Subject:Date:Message-Id; bh=uXHgiyQ96csgFQ1Lw6YKxjPS6x/w6GdUL1tu3OF1KIM=; b=o1ceHMGFqaoMzONDxQV19E/x58AaPiZsF+lfAAE55uu14SImZNeGWlZ/TbmXhYIRjlMvc83ovMavOpSapU8hgfQJDSjlRrh3P1vnvkD1PDkMX/+60JtZ/ktbTZ/ZfULwEFeUm3bXvqA7Kdt6F/O0asIGra2xKu/PT63qwyx02DM= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033068173054;MF=carrionbent@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0W7x8LZI_1717652616; Received: from localhost(mailfrom:carrionbent@linux.alibaba.com fp:SMTPD_---0W7x8LZI_1717652616) by smtp.aliyun-inc.com; Thu, 06 Jun 2024 13:43:52 +0800 From: carrion bent To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, carrion bent Subject: [PATCH v2] ext4: fix macro definition error of EXT4_DIRENT_HASH and EXT4_DIRENT_MINOR_HASH Date: Thu, 6 Jun 2024 13:43:16 +0800 Message-Id: <1717652596-58760-1-git-send-email-carrionbent@linux.alibaba.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1717412239-31392-1-git-send-email-carrionbent@163.com> References: <1717412239-31392-1-git-send-email-carrionbent@163.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: the macro parameter 'entry' of EXT4_DIRENT_HASH and EXT4_DIRENT_MINOR_HASH was not used, but rather the variable 'de' was directly used, which may be a local variable inside a function that calls the macros. Fortunately, all callers have passed in 'de' so far, so this bug didn't have an effect. Signed-off-by: carrion bent --- fs/ext4/ext4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 983dad8..04bdd27 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2338,9 +2338,9 @@ struct ext4_dir_entry_2 { ((struct ext4_dir_entry_hash *) \ (((void *)(entry)) + \ ((8 + (entry)->name_len + EXT4_DIR_ROUND) & ~EXT4_DIR_ROUND))) -#define EXT4_DIRENT_HASH(entry) le32_to_cpu(EXT4_DIRENT_HASHES(de)->hash) +#define EXT4_DIRENT_HASH(entry) le32_to_cpu(EXT4_DIRENT_HASHES(entry)->hash) #define EXT4_DIRENT_MINOR_HASH(entry) \ - le32_to_cpu(EXT4_DIRENT_HASHES(de)->minor_hash) + le32_to_cpu(EXT4_DIRENT_HASHES(entry)->minor_hash) static inline bool ext4_hash_in_dirent(const struct inode *inode) {