)]}'
{
  "commit": "1be62dc190ebaca331038962c873e7967de6cc4b",
  "tree": "a8eb0a106bf362819d2bb0fc602b0e52df6a4198",
  "parents": [
    "4ed919014eb2b591eb8fdd4dd00226a65faddef4"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Apr 04 14:38:17 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Apr 04 14:38:17 2008 -0700"
  },
  "message": "Be more careful about marking buffers dirty\n\nMikulas Patocka noted that the optimization where we check if a buffer\nwas already dirty (and we avoid re-dirtying it) was not really SMP-safe.\n\nSince the read of the old status was not synchronized with anything, an\naggressive CPU re-ordering of memory accesses might have moved that read\nup to before the data was even written to the buffer, and another CPU\nthat cleaned it again, causing the newly dirty state to never actually\nhit the disk.\n\nAdmittedly this would probably never trigger in practice, but it\u0027s still\nwrong.\n\nMikulas sent a patch that fixed the problem, but I dislike the subtlety\nof the whole optimization, so this is an alternate fix that is more\nexplicit about the particular SMP ordering for the optimization, and\nseparates out the speculative reads of the buffer state into its own\nconditional (and makes the memory barrier only happen if we are likely\nto actually hit the optimized case in the first place).\n\nI considered removing the optimization entirely, but Andrew argued for\nit\u0027s continued existence. I\u0027m a push-over.\n\nCc: Mikulas Patocka \u003cmikulas@artax.karlin.mff.cuni.cz\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "98196327ddf0dddc2b3a911441bd4ff493026abf",
      "old_mode": 33188,
      "old_path": "fs/buffer.c",
      "new_id": "39ff14403d137be85dcd11161584abeabd9d7577",
      "new_mode": 33188,
      "new_path": "fs/buffer.c"
    }
  ]
}
