When we analyze the problem, we find that in the discard_buffer will implicitly clear some bits, which bothered us for a while. Add notes to comment so that we can't miss them when analyzing the code. Signed-off-by: Ye Bin <yebin10@xxxxxxxxxx> --- fs/buffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/buffer.c b/fs/buffer.c index c1501a3c5ebe..d05b94cc48c0 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1496,7 +1496,13 @@ EXPORT_SYMBOL(set_bh_page); * Called when truncating a buffer on a page completely. */ -/* Bits that are cleared during an invalidate */ +/* Bits that are cleared during an invalidate + * clear_buffer_mapped + * clear_buffer_req + * clear_buffer_new + * clear_buffer_delay + * clear_buffer_unwritten +*/ #define BUFFER_FLAGS_DISCARD \ (1 << BH_Mapped | 1 << BH_New | 1 << BH_Req | \ 1 << BH_Delay | 1 << BH_Unwritten) -- 2.25.4