Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp164858lqt; Wed, 5 Jun 2024 22:44:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUof699uVkVdZiTbKG2zcAwUD1HPM0jWjJa3rMzO/NqIkXAlttg4jWHudjcziUPKaLYqQPnKITTHWPzGQ3oVABEBXfmXPI3uVZ2Qh/XjA== X-Google-Smtp-Source: AGHT+IGxInLfiVGWTixsL5glt1XvvX7NyW4BFCpPjVGId1y97ceUcimsVOdZMXtMuSAodzAiXyX6 X-Received: by 2002:a05:6a00:181c:b0:6f0:f54a:4e7a with SMTP id d2e1a72fcca58-703e59212b6mr5643551b3a.2.1717652644753; Wed, 05 Jun 2024 22:44:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717652644; cv=pass; d=google.com; s=arc-20160816; b=c2jmxzKqllnGdu6iCJQaqojJ65cWmyxMH+00HnWoANmb/RSMhRDUSB5lat+hNXaREB wV0eRGZ0VTotOHbzghduTptdsUnscgakVicX8Yn91IMOQdw+NHSeywBpf9zJzGT36COo R6q1kR0iB3l6bATjax0EdMIlIRPraKqsryKLiXr7LZPuD9UQ5jHjJk60Qj9FQ/7deXvb gWQiG8ToUH7qbEBm+avqthBn+lotQCLIv9epf6ycT7hma1fPoXPW5iSAxF3pZQTOpzjy 72UR6j2La/Xd8FYMf5SmibdhuZ3+Rp56jLF/q3SvOhpyVxZ93DTdU31H+KneF/On8U30 7oGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=uXHgiyQ96csgFQ1Lw6YKxjPS6x/w6GdUL1tu3OF1KIM=; fh=hcm3CvuP3lnAjSVZ0PE3iqN/rQcWbW9hDJJfzqlpLno=; b=Qr7IhLjOp9ZcgclG8j/wxp8QD+0rrzDD0uyU5rRMM6rwmZtnjfbLSOhBt+xmcnfYPS FBmG9PxZmaij67JJEv8IQ2sQUolIZtFXN5BhJ+y/+XaBoVF/c6U0qRmRcZDKVzfLIqCN v44TMkYVm8wWr1vk+p5qRAvQD5ENKv9PxxeeHPBDBkSJshSPtK+ORd+6POYCJVDqfHBM t1FZwd0+DHkTSnkPjx6BSEeeelMsAWsVKPfdrQt9BSSUu12SgHAtzA4bRwElaItJfdVi bAtZ8fZqPGjAjZzWRkIJak+rUFMKBKNMDQtt8gqQoct3LBVBahWstcGYwAsYSFoAFnOk zZqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=o1ceHMGF; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-ext4+bounces-2789-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-703fd570578si513305b3a.343.2024.06.05.22.44.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 22:44:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2789-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=o1ceHMGF; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-ext4+bounces-2789-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 087512850BC 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 8D6D53AC36; 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) { -- 2.7.4