Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp16712rwb; Fri, 13 Jan 2023 18:12:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXunVnBOLxPK2gyGeoZ23wjj6uUTU+uKcYrBGtCHzW89YMzagBF8O0PnAlgqVAOvDmKqqNti X-Received: by 2002:a17:906:5e41:b0:84d:465e:49b7 with SMTP id b1-20020a1709065e4100b0084d465e49b7mr17688834eju.63.1673662351786; Fri, 13 Jan 2023 18:12:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673662351; cv=none; d=google.com; s=arc-20160816; b=wHtLllTBDlQ55Voi/jEayLu/iu0sbwxlmt50n0QJF3+Dl9H1lKLsyfoxPUDnFh0mEL JLqQ+c5GFEoz0dXfwyeS8HzFwc1krOh4TzkMz9GaKHRvUsSKlI1+EHfvluJCk9jyao3Z bV7ql3/GDeoP+uDE5JgZhzawkxr444k9xbM7FW2tfeowC5EGMYA+kW7OMojHc4jIbMLu JY3MUMt+0X7Ji5MTYpxhcukHcion9tKhF4+ruoAm3mlf6JWmKlFdSvIUPSVSCGf7POod i8xaxUwKNAOdk58/DIZqdz2geRn+Kmsjet+3yUhLmqVrpaNaEaNjawy6b9uxiAeBJWL8 vkhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2bSAuPOf90AG+qMCh9z5TreStksP1wNJVu9Oh307ZSQ=; b=NFwgh1DkVaVjs+VnU2yakK3G924XhPmGxbFXFZboQO6U6gPtfbnpWRwt4+fauGLWKc PPn7zNdAR3rmYNapK+/6HoXSFbFufQDoNidEWeR3R90vWG4S1powIqas3YqxmuOas751 m5l7C3wLlCFvhBy23BbVw4yw/BAWpjSK41MwrLgUphAdfT3bolUwLe+LSAurEe9HvJD1 mbOpo+PADgqPqLk0bckS7FJeJfdwZvi5Mi7ilFkAv7ZhpAZtvoPPVcRdTwdohAPTq35a kYc8OwHXnk7igYJE1b9X68iGfhF2mrFKvSP0ztE4/mls6iVwZzt3onD/gwJFwEfzHw3o D1DQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp39-20020a1709073e2700b0083b22b31cc2si19689773ejc.370.2023.01.13.18.12.19; Fri, 13 Jan 2023 18:12:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231416AbjANB6p (ORCPT + 53 others); Fri, 13 Jan 2023 20:58:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231381AbjANB6m (ORCPT ); Fri, 13 Jan 2023 20:58:42 -0500 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC2EB7458F for ; Fri, 13 Jan 2023 17:58:40 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VZWAukk_1673661515; Received: from e18g06460.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VZWAukk_1673661515) by smtp.aliyun-inc.com; Sat, 14 Jan 2023 09:58:37 +0800 From: Gao Xiang To: linux-erofs@lists.ozlabs.org, Chao Yu , Yue Hu , Jeffle Xu Cc: LKML , Gao Xiang Subject: [PATCH v2 2/2] erofs: remove linux/buffer_head.h dependency Date: Sat, 14 Jan 2023 09:58:12 +0800 Message-Id: <20230114015812.96836-2-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.24.4 In-Reply-To: <20230114015812.96836-1-hsiangkao@linux.alibaba.com> References: <20230114015812.96836-1-hsiangkao@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org EROFS actually never uses buffer heads, therefore just get rid of BH_xxx definitions and linux/buffer_head.h inclusive. Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu Signed-off-by: Gao Xiang --- fs/erofs/internal.h | 20 ++++++-------------- fs/erofs/super.c | 1 - 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index 168c21f16383..b4cc40fa3803 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -388,25 +387,18 @@ extern struct file_system_type erofs_fs_type; extern const struct address_space_operations erofs_raw_access_aops; extern const struct address_space_operations z_erofs_aops; -enum { - BH_Encoded = BH_PrivateStart, - BH_FullMapped, - BH_Fragment, - BH_Partialref, -}; - /* Has a disk mapping */ -#define EROFS_MAP_MAPPED (1 << BH_Mapped) +#define EROFS_MAP_MAPPED 0x0001 /* Located in metadata (could be copied from bd_inode) */ -#define EROFS_MAP_META (1 << BH_Meta) +#define EROFS_MAP_META 0x0002 /* The extent is encoded */ -#define EROFS_MAP_ENCODED (1 << BH_Encoded) +#define EROFS_MAP_ENCODED 0x0004 /* The length of extent is full */ -#define EROFS_MAP_FULL_MAPPED (1 << BH_FullMapped) +#define EROFS_MAP_FULL_MAPPED 0x0008 /* Located in the special packed inode */ -#define EROFS_MAP_FRAGMENT (1 << BH_Fragment) +#define EROFS_MAP_FRAGMENT 0x0010 /* The extent refers to partial decompressed data */ -#define EROFS_MAP_PARTIAL_REF (1 << BH_Partialref) +#define EROFS_MAP_PARTIAL_REF 0x0020 struct erofs_map_blocks { struct erofs_buf buf; diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 481788c24a68..36b795f1ad44 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -5,7 +5,6 @@ * Copyright (C) 2021, Alibaba Cloud */ #include -#include #include #include #include -- 2.24.4