mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
buffer: discard BH_Write_EIO along with the rest of the buffer state
discard_buffer() strips the state that describes where a buffer lives and what has happened to it, because after an invalidate none of it applies any more. BH_Write_EIO belongs in that set for the same reason: it describes a write of the data that is being thrown away. Leaving it set means a buffer_head reused for a different block starts life carrying somebody else's write error. Like the bforget() change, this is mostly theoretical today and becomes load bearing once the rest of the series makes BH_Write_EIO the report of a failed metadata write. Suggested-by: Jan Kara <jack@suse.cz> Acked-by: Weidong Zhu <weizhu@fiu.edu> Signed-off-by: Chao Shi <coshi036@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/c6e9db48d8d0feb83d4ca29306f4bc1e58f1ee0f.1785951556.git.coshi036@gmail.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
d9a8f9ffce
commit
7d439c46c9
|
|
@ -1493,7 +1493,7 @@ EXPORT_SYMBOL(folio_set_bh);
|
|||
/* Bits that are cleared during an invalidate */
|
||||
#define BUFFER_FLAGS_DISCARD \
|
||||
(1 << BH_Mapped | 1 << BH_New | 1 << BH_Req | \
|
||||
1 << BH_Delay | 1 << BH_Unwritten)
|
||||
1 << BH_Delay | 1 << BH_Unwritten | 1 << BH_Write_EIO)
|
||||
|
||||
static void discard_buffer(struct buffer_head * bh)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user