[PATCH 2/3] erofs-utils: get rid of .preflush()

Gao Xiang hsiangkao at linux.alibaba.com
Mon Oct 23 19:12:40 AEDT 2023


It's actually never used.

Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
---
 include/erofs/cache.h | 1 -
 lib/cache.c           | 5 -----
 2 files changed, 6 deletions(-)

diff --git a/include/erofs/cache.h b/include/erofs/cache.h
index de5584e..31f54a4 100644
--- a/include/erofs/cache.h
+++ b/include/erofs/cache.h
@@ -30,7 +30,6 @@ struct erofs_buffer_block;
 #define DEVT		5
 
 struct erofs_bhops {
-	bool (*preflush)(struct erofs_buffer_head *bh);
 	bool (*flush)(struct erofs_buffer_head *bh);
 };
 
diff --git a/lib/cache.c b/lib/cache.c
index 3424e59..e3cf69e 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -380,11 +380,6 @@ bool erofs_bflush(struct erofs_buffer_block *bb)
 		if (p == bb)
 			break;
 
-		/* check if the buffer block can flush */
-		list_for_each_entry(bh, &p->buffers.list, list)
-			if (bh->op->preflush && !bh->op->preflush(bh))
-				return false;
-
 		blkaddr = __erofs_mapbh(p);
 
 		list_for_each_entry_safe(bh, nbh, &p->buffers.list, list) {
-- 
2.39.3



More information about the Linux-erofs mailing list