)]}'
{
  "commit": "1e9fd53b783ea646de3ee09a4574afeb6778d504",
  "tree": "0b87e9ca83c612a1c3c5b91a359f8604cde48c45",
  "parents": [
    "9eaaa2d5759837402ec5eee13b2a97921808c3eb"
  ],
  "author": {
    "name": "Jan Kara",
    "email": "jack@suse.cz",
    "time": "Wed Jun 24 17:31:40 2009 +0200"
  },
  "committer": {
    "name": "Jan Kara",
    "email": "jack@suse.cz",
    "time": "Wed Jul 15 21:30:07 2009 +0200"
  },
  "message": "jbd: Fix a race between checkpointing code and journal_get_write_access()\n\nThe following race can happen:\n\n  CPU1                          CPU2\n                                checkpointing code checks the buffer, adds\n                                  it to an array for writeback\ndo_get_write_access()\n  ...\n  lock_buffer()\n  unlock_buffer()\n                                  flush_batch() submits the buffer for IO\n  __jbd_journal_file_buffer()\n\n  So a buffer under writeout is returned from do_get_write_access(). Since\nthe filesystem code relies on the fact that journaled buffers cannot be\nwritten out, it does not take the buffer lock and so it can modify buffer\nwhile it is under writeout. That can lead to a filesystem corruption\nif we crash at the right moment. The similar problem can happen with\nthe journal_get_create_access() path.\n  We fix the problem by clearing the buffer dirty bit under buffer_lock\neven if the buffer is on BJ_None list. Actually, we clear the dirty bit\nregardless the list the buffer is in and warn about the fact if\nthe buffer is already journalled.\n\nThanks for spotting the problem goes to dingdinghua \u003cdingdinghua85@gmail.com\u003e.\n\nReported-by: dingdinghua \u003cdingdinghua85@gmail.com\u003e\nSigned-off-by: Jan Kara \u003cjack@suse.cz\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "73242ba7c7b1315d9cea08de1f85f1189293dd22",
      "old_mode": 33188,
      "old_path": "fs/jbd/transaction.c",
      "new_id": "c03ac11f74be1313b8f7d09a24eba88f1d27ceed",
      "new_mode": 33188,
      "new_path": "fs/jbd/transaction.c"
    }
  ]
}
