--- a/fs/buffer.c~fs-bufferc-add-checking-buffer-head-stat-before-clear +++ a/fs/buffer.c @@ -2083,7 +2083,8 @@ static int __block_commit_write(struct i set_buffer_uptodate(bh); mark_buffer_dirty(bh); } - clear_buffer_new(bh); + if (buffer_new(bh)) + clear_buffer_new(bh); block_start = block_end; bh = bh->b_this_page;