Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp809231lqt; Thu, 6 Jun 2024 21:37:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXo0zVFuXmdfqVMGbfpLB2X3ZNq3+CMP2vGIijTWpRdDphg5yUHFcY1F78M/KpPlskzr79z4T1CA+OO7uWrF6wzLvBIjOfFuGo+69Jfkw== X-Google-Smtp-Source: AGHT+IE7+alRWkF/4pnGVttkcaRtbT4+foQFTqIZGK4WiBWprqgyQ4uZ1aJKj4WKXSUylRzc0X7g X-Received: by 2002:a17:90a:d144:b0:2c2:c147:3d0a with SMTP id 98e67ed59e1d1-2c2c1473fbamr488110a91.28.1717735053064; Thu, 06 Jun 2024 21:37:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717735053; cv=pass; d=google.com; s=arc-20160816; b=m3Dn3eI2Eue+Bj3iqMw2p+WoKj3hHoyJmygIfPEFp4c8Vo/lzDPVrcOpeAfG0XyPSx XJT5FhWR3fCrgGsRc1ao1NpcI4aoLTi+GbfOwj/t1Q+2yR5t1lPDXOwclEJw7WqODWgo Xek/6IioJTrLw1ErbX4tlm0gbg7PSVDibxbDbEO7ZjNLheC9G1GOmCEZWn4+Z/9Nt10V MAMNDDdYPBzMqlqyljz+UGMG0NArxSIdvT+3ACGmkz0YYZcrxRkWMxIr8Ns+gC2LgqtZ NpTd2Rmh9AqwrSWq36AEVnRcsNfHzoIxrQRQN+Z95+p8K5Yyn/gqEzxWe0zEZGPFPtK4 /qag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=8aanrT3tZ21NIQIvMVMnfcVVTVT8+aaRuCBGrIKoLZQ=; fh=yXYChwFvQA/NaaLzCC0IJdkW11OhjXgO4DHXzVmnGFw=; b=HRXsDEKseThCefQxFxk6FH8mdHtuU2pGWltbAq09gQVHn0f0OuPp/BQSMssihFUC7H w9XqKK2zvo/47SQbcc7m0hiIvWo47G5vzZp1N5tiCM/ay2VB7uSwvTzj32z2EdbdE+dv uQjMcr9c54aOUX7tD5f6Xst2kGxyclLh2/loBfewRgizDo8Lede1kfjeei4/DNb4IhEH w1DgezHkqGAHbDwgHQNVaiNuNIPUhFmgWLvjDUstfFsv94SaRKlK8x18ZqmcnIVwGTfs 8Ku9gDt2lGniMradAAaoB07ipxq3vSkh2YR2vTOU0Kf7VsrP1vu0ZUoIrKq7un/3KyIH yDrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-205290-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c29c48c2a1si2393908a91.130.2024.06.06.21.37.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 21:37:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205290-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; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-205290-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 E47E5288645 for ; Fri, 7 Jun 2024 04:28:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CAF313AD1D; Fri, 7 Jun 2024 04:26:42 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 8655471748 for ; Fri, 7 Jun 2024 04:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717734402; cv=none; b=c+RT6y7kI5hDpFDd8IY0IqtmCjojaHWhoIPpbFagIYV/i7bzPKG6K86wyUUFY7tf3BP2HFYBYRsBjmTAcJfLpaU0NNo+UipQqsOFskJS0dEevefCwiXfIbKA1KxmKQmXub/a/TWIYmlqSDm5mgKfxRhsqfp6s2T8htFkAYzarYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717734402; c=relaxed/simple; bh=GQySivaiRX14z1eZ89F5JjO7WBQlQwYooAtohJTTEDo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DvSEZ94gTgARTcmRWsWmHOFjmiKQ+m0q92A/nK5y6f1SiXgalqptnLTpqdYRj+OUFvrCIkVBq7YQMm6q8cytKqf0x24wPM3juSCf/kAzGZ4Pm8cqAifu5hBSCfzqGGkupW09Uk0SmAaSFiKMmtgjKhgXXqzzUa35RD26kfEk9Zs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4VwSm41G3LzdZMD; Fri, 7 Jun 2024 12:25:08 +0800 (CST) Received: from kwepemm600013.china.huawei.com (unknown [7.193.23.68]) by mail.maildlp.com (Postfix) with ESMTPS id 18E0218007E; Fri, 7 Jun 2024 12:26:33 +0800 (CST) Received: from huawei.com (10.175.104.67) by kwepemm600013.china.huawei.com (7.193.23.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 7 Jun 2024 12:26:32 +0800 From: Zhihao Cheng To: , , , , , CC: , Subject: [RFC PATCH mtd-utils 008/110] mkfs.ubifs: Fix wrong xattr entry type Date: Fri, 7 Jun 2024 12:24:33 +0800 Message-ID: <20240607042615.2069840-9-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240607042615.2069840-1-chengzhihao1@huawei.com> References: <20240607042615.2069840-1-chengzhihao1@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600013.china.huawei.com (7.193.23.68) The type of xattr entry should be regular file, otherwise xattr entry and xattr inode have inconsistent types. Fixes: 50044efbd6e713 ("mkfs.ubifs: Add extended attribute support") Signed-off-by: Zhihao Cheng --- ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c index 51852861..8bf073ce 100644 --- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c @@ -1255,7 +1255,7 @@ static int add_xattr(struct ubifs_ino_node *host_ino, struct stat *st, xent->ch.len = len; xent->padding1 = 0; - xent->type = UBIFS_ITYPE_DIR; + xent->type = UBIFS_ITYPE_REG; xent->nlen = cpu_to_le16(nm.len); memcpy(xent->name, nm.name, nm.len + 1); -- 2.13.6