diff mbox series

[1/2] ext4: Add comment to BUFFER_FLAGS_DISCARD for search code

Message ID 20200822082218.2228697-2-yebin10@huawei.com
State Rejected
Headers show
Series Fix race between do_invalidatepage and init_page_buffers | expand

Commit Message

yebin (H) Aug. 22, 2020, 8:22 a.m. UTC
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@huawei.com>
---
 fs/buffer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

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)