Skip to content

ext4: Fix for WARN_ON_ONCE when marking buffer dirty

Pranay Kr. Srivastava linux-ext4 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1ext4: Fix WARN_ON_ONCE when marking buffer dirtyfs/ext4/super.c+16 -143 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1]ext4: Fix for WARN_ON_ONCE when marking buffer dirty

1) Fix WARN_ON_ONCE when marking buffer dirty it's possible that a writeback for the super block buffer head is triggered after setting the buffer uptodate on a buffer write_io_error.

If however there's an error while writing the buffer head then the buffer is cleared from being uptodate.

If the buffer uptodate is not set while calling mark_buffer_dirty, it throws a WARN_ON_ONCE.
This patch fixes it by locking the buffer while marking the buffer uptodate and then marking it dirty while holding the buffer head lock.

Pranay Kr. Srivastava (5):
Fix WARN_ON_ONCE when marking buffer dirty

 fs/ext4/super.c     |  30 +++++-----
 1 files changed, 16 insertions(+), 14 deletions(-)
Signature · 1 line
1.9.1