From patchwork Fri Jan 13 06:52:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gao Xiang X-Patchwork-Id: 43041 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp128444wrt; Thu, 12 Jan 2023 23:15:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXsDcWO42MhpQjs8cDsxMe47ifPOmH4fMLlAfuwRYg138X8aZJijb/VzygimEJI0dQ2+Vprk X-Received: by 2002:a05:6402:1055:b0:467:c3cb:49aa with SMTP id e21-20020a056402105500b00467c3cb49aamr66027022edu.4.1673594110281; Thu, 12 Jan 2023 23:15:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673594110; cv=none; d=google.com; s=arc-20160816; b=KiU+MHa43J2DQOOMddGFBQXeTLJzcR98d83j/8b6endcouB41SU1zHbRYTuRkiF7Or tOeeTJAiIjPJHgAZYZM/ZkaugxHVa/v55KTckmdX5g4F5M1jYqsh28FTKHICb0S3covx z2hJsy0mNhVK/jE3CqWD7Jt+7o2oDB9J0CirlcKsCu1WypZRKK30V+i7k7tlZldSA7bm i37FwH7rTT4ibkVFUPK0sLrisZGhwkYutLgHMVaMfRvieOiQ7NJ6cl7YDi/bz7BxAuao fR5c5IL7IEIaDxg1D/Q3crJrxVsC7Q7z8kVe4Sv3nbedNs1FARtDTKLohec1VxBmJgtw ZhZA== 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=AGVw4SclNyjh1nI3W2qscrgx3mfNB4wczNwWkqu4sMY=; b=RTVqwjYb/wNf5ndxJZBwFi3LtuWA5MVXSVmWkaaXvP35bGcYj1IcYfAu1/d9eQvqAI Gf86mTA8hToM4cbOdt5K9lLTb5NqtXEucik5OnbikIm+FhpQuje8zr09MHOwVNqe9Efa pk1dxoq9ePvMLc3jeUeq8SbOwkuQXFFWeOHt11pFqISIymZgw5aAPj4vFW3Y3ndGJGil 9v9+fyMhOnHJT5bvIp16yHg3ETMY4GNU+baAB56N+BDdEqklJ+IbDV3NXgf4DNx2RPQ9 C/NNglCB+9Vw2vJVp9zaLQ0eUZLulNBc6xpGz+blEvBZZ2a4m7K4LpkFRQD5wEnupdez ItyA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a509b0f000000b0046c53c2be4asi11764936edi.365.2023.01.12.23.14.38; Thu, 12 Jan 2023 23:15:10 -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 S241078AbjAMHEr (ORCPT + 99 others); Fri, 13 Jan 2023 02:04:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241200AbjAMHDU (ORCPT ); Fri, 13 Jan 2023 02:03:20 -0500 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0A7B7459D for ; Thu, 12 Jan 2023 22:52:38 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R221e4;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_---0VZToXiH_1673592752; Received: from e18g06460.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VZToXiH_1673592752) by smtp.aliyun-inc.com; Fri, 13 Jan 2023 14:52:34 +0800 From: Gao Xiang To: linux-erofs@lists.ozlabs.org, Chao Yu , Yue Hu , Jeffle Xu Cc: LKML , Gao Xiang Subject: [PATCH 2/2] erofs: remove linux/buffer_head.h dependency Date: Fri, 13 Jan 2023 14:52:26 +0800 Message-Id: <20230113065226.68801-2-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.24.4 In-Reply-To: <20230113065226.68801-1-hsiangkao@linux.alibaba.com> References: <20230113065226.68801-1-hsiangkao@linux.alibaba.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754890617842365153?= X-GMAIL-MSGID: =?utf-8?q?1754890617842365153?= EROFS actually never uses buffer heads, therefore just get rid of BH_xxx definitions and linux/buffer_head.h inclusive. Signed-off-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu --- 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