erofs-utils: get rid of .preflush()
authorGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 23 Oct 2023 08:12:40 +0000 (16:12 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 24 Oct 2023 00:24:38 +0000 (08:24 +0800)
It's actually never used.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20231023081241.1946579-2-hsiangkao@linux.alibaba.com
include/erofs/cache.h
lib/cache.c

index de5584e6f7a1b42374dbd0e36c265d67b2316b7f..31f54a405db19450390a741ccb9a8eba79f6c6b6 100644 (file)
@@ -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);
 };
 
index 3424e59782addbb22afd37a437ec8a2d594e0745..e3cf69e4e3595a4f5660b0d9221247c361d52c85 100644 (file)
@@ -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) {