Skip to content

Commit

Permalink
erofs: remove linux/buffer_head.h dependency
Browse files Browse the repository at this point in the history
EROFS actually never uses buffer heads, therefore just get rid of
BH_xxx definitions and linux/buffer_head.h inclusive.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Yue Hu <[email protected]>
Reviewed-by: Jingbo Xu <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Gao Xiang <[email protected]>
  • Loading branch information
hsiangkao committed Feb 15, 2023
1 parent 7c3511a commit 768bb10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
20 changes: 6 additions & 14 deletions fs/erofs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/bio.h>
#include <linux/buffer_head.h>
#include <linux/magic.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion fs/erofs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (C) 2021, Alibaba Cloud
*/
#include <linux/module.h>
#include <linux/buffer_head.h>
#include <linux/statfs.h>
#include <linux/parser.h>
#include <linux/seq_file.h>
Expand Down

0 comments on commit 768bb10

Please sign in to comment.